Skip to content

Update pagination.md #6787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2019
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
10 changes: 4 additions & 6 deletions docs/api-guide/pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,10 @@ To have your custom pagination class be used by default, use the `DEFAULT_PAGINA

API responses for list endpoints will now include a `Link` header, instead of including the pagination links as part of the body of the response, for example:

![Link Header][link-header]

*A custom pagination style, using the 'Link' header'*

## Pagination & schemas

You can also make the pagination controls available to the schema autogeneration
Expand All @@ -268,12 +272,6 @@ The method should return a list of `coreapi.Field` instances.

---

![Link Header][link-header]

*A custom pagination style, using the 'Link' header'*

---

# HTML pagination controls

By default using the pagination classes will cause HTML pagination controls to be displayed in the browsable API. There are two built-in display styles. The `PageNumberPagination` and `LimitOffsetPagination` classes display a list of page numbers with previous and next controls. The `CursorPagination` class displays a simpler style that only displays a previous and next control.
Expand Down