def get(self): query = Location.select() locations = [] for location in query: locations.append(location.to_dict()) return {'status': 'ok', 'locations': locations}
def get_locations(self): return ModelLocation.select().order_by(ModelLocation.location.asc())