Exemplo n.º 1
0
 def _jsonify_many(self):
     query = Location.query.filter_by(is_deleted=False)
     return jsonify(admin_locations_schema.dump(query.all()))
Exemplo n.º 2
0
 def _jsonify_one(self, location):
     return jsonify(admin_locations_schema.dump(location, many=False))
Exemplo n.º 3
0
 def _process(self):
     query = Location.query.options(joinedload('rooms'))
     return jsonify(admin_locations_schema.dump(query.all()).data)
Exemplo n.º 4
0
 def _process(self):
     query = Location.query.options(joinedload('rooms'))
     return jsonify(admin_locations_schema.dump(query.all()).data)
Exemplo n.º 5
0
 def _jsonify_many(self):
     query = Location.query.filter_by(is_deleted=False).options(joinedload('rooms'))
     return jsonify(admin_locations_schema.dump(query.all()))