

def all_relationships(self):
    for rel in self.relationships.all():
        (yield rel)
    for rel in self.inverserelationships.all():
        (yield rel)

dataset/ETHPy150Open wq/wq.db/patterns/relate/models.py RelatedModel.all_relationships/original