diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index 9928118fd9..1e3098d7db 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -516,6 +516,16 @@ subclass:: Django will only honor the first element in the list/tuple; any others will be ignored. +.. attribute:: ModelAdmin.paginator + + .. versionadded:: 1.3 + + The paginator class to be used for pagination. By default, + :class:`django.core.paginator.Paginator` is used. If the custom paginator + class doesn't have the same constructor interface as + :class:`django.core.paginator.Paginator`, you will also need to + provide an implementation for :meth:`MultipleObjectMixin.get_paginator`. + .. attribute:: ModelAdmin.prepopulated_fields Set ``prepopulated_fields`` to a dictionary mapping field names to the @@ -945,6 +955,13 @@ templates used by the :class:`ModelAdmin` views: using the :mod:`django.contrib.messages` backend. See the :ref:`custom ModelAdmin example <custom-admin-action>`. +.. method:: ModelAdmin.get_paginator(queryset, per_page, orphans=0, allow_empty_first_page=True) + + .. versionadded:: 1.3 + + Returns an instance of the paginator to use for this view. By default, + instantiates an instance of :attr:`paginator`. + Other methods ~~~~~~~~~~~~~ |
