def get(self): hs = hotel_schema.HotelSchema(many=True) filter_hotel = filter_args(path_params) try: return make_response(paginate(HotelModel, hs, filter_hotel), 200) except Exception as e: return make_response( jsonify({'message': 'internal error server', 'error': f'{e}'}), 500)
def get(self): res = pagination.paginate(Article, ArticleSchema(many=True), True) return res, 200
def get(self): """Retvrieve malls using pagination""" from app import pagination return { 'malls': pagination.paginate(MallModel, MallModel.mall_fields()) }
def get(self): """Retrieve all units using pagination.""" from app import pagination return { 'units': pagination.paginate(UnitModel, UnitModel.unit_fields()) }
def get(self): hs = site_schema.SiteSchema(many=True) return make_response(pagination.paginate(site_model.SiteModel, hs), 200)
def get(self): """Retrieve all Accounts using pagination.""" from app import pagination return {'accounts': pagination.paginate(AccountModel, AccountModel.account_filed())}
def get(self, content_id): return pagination.paginate(Content.query.filter_by(id=content_id), Content.marshal_detailed)
def get(self): return pagination.paginate(Content.query.all(), Content.marshal)