示例#1
0
 def _jsonify_one(self, attribute):
     counts = self._get_room_counts()
     attr = room_attribute_schema.dump(attribute)
     attr['num_rooms'] = counts.get(attr['id'], 0)
     return jsonify(attr)
示例#2
0
文件: admin.py 项目: indico/indico
 def _jsonify_one(self, attribute):
     counts = self._get_room_counts()
     attr = room_attribute_schema.dump(attribute)
     attr['num_rooms'] = counts.get(attr['id'], 0)
     return jsonify(attr)
示例#3
0
 def _dump_attributes(self):
     query = RoomAttribute.query.order_by(RoomAttribute.title)
     return room_attribute_schema.dump(query, many=True)
示例#4
0
文件: admin.py 项目: indico/indico
 def _dump_attributes(self):
     query = RoomAttribute.query.order_by(RoomAttribute.title)
     return room_attribute_schema.dump(query, many=True)