Пример #1
0
def entities_index(obj_id):
    query = Property.all()
    query = query.filter(Property.relation_id != None)
    obj = Entity.by_id(obj_id)
    query = query.filter_by(entity_id=obj_id)
    return _index(query, obj)
Пример #2
0
def relations_index(obj_id):
    query = Property.all()
    query = query.filter(Property.relation_id != None)
    obj = Relation.by_id(obj_id)
    query = query.filter_by(relation_id=obj_id)
    return _index(query, obj)