Esempio n. 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)
Esempio n. 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)
Esempio n. 3
0
 def _dump_attributes(self):
     query = RoomAttribute.query.order_by(RoomAttribute.title)
     return room_attribute_schema.dump(query, many=True)
Esempio n. 4
0
 def _dump_attributes(self):
     query = RoomAttribute.query.order_by(RoomAttribute.title)
     return room_attribute_schema.dump(query, many=True)