Ticket #8407: pagination-docs-r8629.diff

File pagination-docs-r8629.diff, 1.3 KB (added by arien, 16 years ago)

patch updated for documentation refactor

  • docs/topics/pagination.txt

     
    1111
    1212Django provides a few classes that help you manage paginated data -- that is,
    1313data that's split across several pages, with "Previous/Next" links. These
    14 classes live in the module :file:`django/core/paginator.py`.
     14classes live in :file:`django/core/paginator.py`.
    1515
    1616Example
    1717=======
     
    5858    >>> p.page(0)
    5959    Traceback (most recent call last):
    6060    ...
    61     InvalidPage
     61    EmptyPage: That page number is less than 1
    6262    >>> p.page(3)
    6363    Traceback (most recent call last):
    6464    ...
    65     InvalidPage
     65    EmptyPage: That page contains no results
    6666
     67.. note::
     68
    6769    Note that you can give ``Paginator`` a list/tuple, a Django ``QuerySet``, or
    6870    any other object with a ``count()`` or ``__len__()`` method. When
    6971    determining the number of objects contained in the passed object,
     
    105107
    106108``allow_empty_first_page``
    107109    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.
    109111
    110112Methods
    111113-------
Back to Top