mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Merge pull request #467 from tomchristie/page-kwarg
Add 'page_kwarg' attribute to `MultipleObjectMixin`, removing hardcoded "page".
This commit is contained in:
commit
778b8bdcf4
4 changed files with 26 additions and 3 deletions
|
@ -69,8 +69,17 @@ MultipleObjectMixin
|
|||
An integer specifying how many objects should be displayed per page. If
|
||||
this is given, the view will paginate objects with
|
||||
:attr:`MultipleObjectMixin.paginate_by` objects per page. The view will
|
||||
expect either a ``page`` query string parameter (via ``GET``) or a
|
||||
``page`` variable specified in the URLconf.
|
||||
expect either a ``page`` query string parameter (via ``request.GET``)
|
||||
or a ``page`` variable specified in the URLconf.
|
||||
|
||||
.. attribute:: page_kwarg
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
||||
A string specifying the name to use for the page parameter.
|
||||
The view will expect this prameter to be available either as a query
|
||||
string parameter (via ``request.GET``) or as a kwarg variable specified
|
||||
in the URLconf. Defaults to ``page``.
|
||||
|
||||
.. attribute:: paginator_class
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue