

def __get__(self, instance, owner):
    super(OneToMany, self)._set_up(instance, owner)
    if (not instance):
        return self.model
    if (not self.field):
        self.field = ('%s_id' % instance.Meta.table)
    conditions = {
        self.field: getattr(instance, instance.Meta.pk),
    }
    return Query(model=self.model, conditions=conditions)

dataset/ETHPy150Open mimecuvalo/helloworld/packages/autumn/db/relations.py OneToMany.__get__/original