diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/class-based-views.txt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/ref/class-based-views.txt b/docs/ref/class-based-views.txt index 28ce024483..1b9a9f99ea 100644 --- a/docs/ref/class-based-views.txt +++ b/docs/ref/class-based-views.txt @@ -305,6 +305,14 @@ MultipleObjectMixin expect either a ``page`` query string parameter (via ``GET``) or a ``page`` variable specified in the URLconf. + .. attribute:: paginator_class + + 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:: context_object_name Designates the name of the variable to use in the context. @@ -329,6 +337,11 @@ MultipleObjectMixin pagination. By default this simply returns the value of :attr:`MultipleObjectMixin.paginate_by`. + .. method:: get_paginator(queryset, queryset, per_page, orphans=0, allow_empty_first_page=True) + + Returns an instance of the paginator to use for this view. By default, + instantiates an instance of :attr:`paginator_class`. + .. method:: get_allow_empty() Return a boolean specifying whether to display the page if no objects |
