Ticket #8407: pagination-docs-r8629.diff
File pagination-docs-r8629.diff, 1.3 KB (added by , 16 years ago) |
---|
-
docs/topics/pagination.txt
11 11 12 12 Django provides a few classes that help you manage paginated data -- that is, 13 13 data that's split across several pages, with "Previous/Next" links. These 14 classes live in the module:file:`django/core/paginator.py`.14 classes live in :file:`django/core/paginator.py`. 15 15 16 16 Example 17 17 ======= … … 58 58 >>> p.page(0) 59 59 Traceback (most recent call last): 60 60 ... 61 InvalidPage61 EmptyPage: That page number is less than 1 62 62 >>> p.page(3) 63 63 Traceback (most recent call last): 64 64 ... 65 InvalidPage65 EmptyPage: That page contains no results 66 66 67 .. note:: 68 67 69 Note that you can give ``Paginator`` a list/tuple, a Django ``QuerySet``, or 68 70 any other object with a ``count()`` or ``__len__()`` method. When 69 71 determining the number of objects contained in the passed object, … … 105 107 106 108 ``allow_empty_first_page`` 107 109 Whether or not the first page is allowed to be empty. If ``False`` and 108 ``object_list`` is empty, then a ``EmptyPage`` error will be raised.110 ``object_list`` is empty, then an ``EmptyPage`` error will be raised. 109 111 110 112 Methods 111 113 -------