diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2008-08-28 13:44:50 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2008-08-28 13:44:50 +0000 |
| commit | f53596d59f60c171e49fa640b46435aee08f3031 (patch) | |
| tree | 6241c6151913334908aa30a7a2e5fd001de50f16 /docs | |
| parent | 5c43a0a43f6cf42de21066b789c19208cac2ea36 (diff) | |
Fixed #8407: Corrected some output in the Paginator docs. Thanks to arien for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/pagination.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/docs/topics/pagination.txt b/docs/topics/pagination.txt index 8911e67bbb..6442341f68 100644 --- a/docs/topics/pagination.txt +++ b/docs/topics/pagination.txt @@ -11,7 +11,7 @@ Pagination 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 the module :file:`django/core/paginator.py`. +classes live in :file:`django/core/paginator.py`. Example ======= @@ -58,11 +58,13 @@ page:: >>> p.page(0) Traceback (most recent call last): ... - InvalidPage + EmptyPage: That page number is less than 1 >>> p.page(3) Traceback (most recent call last): ... - InvalidPage + EmptyPage: That page contains no results + +.. note:: Note that you can give ``Paginator`` a list/tuple, a Django ``QuerySet``, or any other object with a ``count()`` or ``__len__()`` method. When @@ -105,7 +107,7 @@ Optional arguments ``allow_empty_first_page`` Whether or not the first page is allowed to be empty. If ``False`` and - ``object_list`` is empty, then a ``EmptyPage`` error will be raised. + ``object_list`` is empty, then an ``EmptyPage`` error will be raised. Methods ------- |
