class PaginationFlaskResty(GenericModelView): model = Article schema = ArticleSchema(many=True) pagination = PagePagination(page_size=5) def get(self): return self.list()
class PageWidgetListView(WidgetViewBase): pagination = PagePagination(2) def get(self): return self.list() def post(self): return self.create()
class AuthorViewBase(GenericModelView): model = models.Author schema = schemas.AuthorSchema() authentication = NoOpAuthentication() authorization = NoOpAuthorization() pagination = PagePagination(page_size=10) sorting = Sorting("created_at", default="-created_at")
class BookViewBase(GenericModelView): model = models.Book schema = schemas.BookSchema() authentication = NoOpAuthentication() authorization = NoOpAuthorization() pagination = PagePagination(page_size=10) sorting = Sorting("published_at", default="-published_at") filtering = Filtering(author_id=ColumnFilter(operator.eq, required=True))
class FooListView(FooViewBase): spec_declaration = ModelViewDeclaration(many=True) filtering = Filtering(color=operator.eq, ) sorting = Sorting('name', 'color') pagination = PagePagination(2) def get(self): pass def post(self): """test the docstring""" pass
class FooListView(GenericModelView): schema = schemas['foo']() spec_declaration = ModelViewDeclaration(many=True) filtering = Filtering(color=operator.eq, ) sorting = Sorting('name', 'color') pagination = PagePagination(2) def get(self): pass def post(self): """test the docstring""" pass
class PageWidgetListView(WidgetListViewBase): pagination = PagePagination(2)