diff options
| author | Adam Johnson <me@adamj.eu> | 2021-02-08 23:38:55 +0000 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2021-02-11 14:20:19 +0100 |
| commit | 2ce4f7324193e3110af83a53e9d2f744b6d9166c (patch) | |
| tree | c758f85fb3ead926f1bc6c6790acfdbd748c4fe4 /docs/ref | |
| parent | aa1aed923b391b56d514be499c4ddf4b5110b377 (diff) | |
[3.2.x] Improved pagination documentation
* Link to the topic guide
* Document that page() can raise PageNotAnInteger.
Backport of a57e91adeeef4fe97db3e589b20bf2a30c907e21 from master
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/paginator.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/ref/paginator.txt b/docs/ref/paginator.txt index 4cc5483828..cd6df42eae 100644 --- a/docs/ref/paginator.txt +++ b/docs/ref/paginator.txt @@ -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. @@ -76,7 +78,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) |
