Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 749 Bytes

pagination.rst

File metadata and controls

15 lines (11 loc) · 749 Bytes

Pagination

PRF has built in support for pagination. You can set the default pagination class for you project using the restful.default_pagination_class setting. The pagination class can also be set on a per view settings using the pagination_class class attribute. PRF supports two styles of pagination out of the box, PageNumberPagination and LinkHeaderPagination pagination. You can find the details about these pagination classes in the pagination <api-pagination-label> section of the API docs.

Custom Pagination Classes

To create you own pagination classes simply extend the BasePagination class and implement the paginate_query() and get_paginated_response() methods.