Skip to content
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

Improved pagination documentation #13991

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/ref/paginator.txt
Expand Up @@ -6,6 +6,8 @@ Django provides a few classes that help you manage paginated data -- that is,
data that's split across several pages, with "Previous/Next" links. These
classes live in :source:`django/core/paginator.py`.

For examples, see the :doc:`Pagination topic guide </topics/pagination>`.

.. module:: django.core.paginator
:synopsis: Classes to help you easily manage paginated data.

Expand Down Expand Up @@ -72,7 +74,9 @@ Methods
.. method:: Paginator.page(number)

Returns a :class:`Page` object with the given 1-based index. Raises
:exc:`InvalidPage` if the given page number doesn't exist.
:exc:`PageNotAnInteger` if the ``number`` cannot be converted to an integer
by calling ``int()``. Raises :exc:`InvalidPage` if the given page number
doesn't exist.

.. method:: Paginator.get_elided_page_range(number, *, on_each_side=3, on_ends=2)

Expand Down