Пример #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
 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
 def _dump_attributes(self):
     query = RoomAttribute.query.order_by(RoomAttribute.title)
     return room_attribute_schema.dump(query, many=True)