Pyramid Restful Framework
stable

User Guide

  • Quick Start
  • Configuration
  • Class-based Views
  • Generic Views
  • ViewSets
  • Permissions
  • Filters
  • Expandables
  • Pagination
    • Custom Pagination Classes

API Guide

  • views
  • generics
  • viewsets
  • mixins
  • decorators
  • routers
  • permissions
  • filters
  • expandables
  • pagination
Pyramid Restful Framework
  • Docs »
  • Pagination
  • Edit on GitHub

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 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.

Next Previous

© Copyright 2018, Daniel Poland. Revision 4f85bddd.

Built with Sphinx using a theme provided by Read the Docs.