Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/api-guide/pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,18 @@ To enable the `PageNumberPagination` style globally, use the following configura

On `GenericAPIView` subclasses you may also set the `pagination_class` attribute to select `PageNumberPagination` on a per-view basis.

By default, the query parameter name used for pagination is `page`.
This can be customized by subclassing `PageNumberPagination` and overriding the `page_query_param` attribute.

For example:

from rest_framework.pagination import PageNumberPagination

class CustomPagination(PageNumberPagination):
page_query_param = 'p'

With this configuration, clients would request pages using `?p=2` instead of `?page=2`.

#### Configuration

The `PageNumberPagination` class includes a number of attributes that may be overridden to modify the pagination style.
Expand Down