Improved queryset handling and docs for (Single|Multiple)ObjectMixin.

This commit is contained in:
Loic Bistuer 2013-08-09 17:31:17 +07:00
parent 8442268869
commit f8a6a4eba1
4 changed files with 42 additions and 14 deletions

View file

@ -63,6 +63,14 @@ MultipleObjectMixin
A ``QuerySet`` that represents the objects. If provided, the value of
``queryset`` supersedes the value provided for :attr:`model`.
.. warning::
``queryset`` is a class attribute with a *mutable* value so care
must be taken when using it directly. Before using it, either call
its :meth:`~django.db.models.query.QuerySet.all` method or
retrieve it with :meth:`get_queryset` which takes care of the
cloning behind the scenes.
.. attribute:: paginate_by
An integer specifying how many objects should be displayed per page. If

View file

@ -23,6 +23,14 @@ SingleObjectMixin
A ``QuerySet`` that represents the objects. If provided, the value of
``queryset`` supersedes the value provided for :attr:`model`.
.. warning::
``queryset`` is a class attribute with a *mutable* value so care
must be taken when using it directly. Before using it, either call
its :meth:`~django.db.models.query.QuerySet.all` method or
retrieve it with :meth:`get_queryset` which takes care of the
cloning behind the scenes.
.. attribute:: slug_field
The name of the field on the model that contains the slug. By default,