diff options
| author | Loic Bistuer <loic.bistuer@sixmedia.com> | 2013-08-09 17:31:17 +0700 |
|---|---|---|
| committer | Loic Bistuer <loic.bistuer@sixmedia.com> | 2013-08-09 17:51:58 +0700 |
| commit | f8a6a4eba1b52dd634ab3e72637cd47412dcfa6e (patch) | |
| tree | f3db831a64c24ec5b76cee653f8cfb9b52987cb2 /docs | |
| parent | 8442268869a691767788bcbb4df90ddb28abb8f2 (diff) | |
Improved queryset handling and docs for (Single|Multiple)ObjectMixin.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/class-based-views/mixins-multiple-object.txt | 8 | ||||
| -rw-r--r-- | docs/ref/class-based-views/mixins-single-object.txt | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/docs/ref/class-based-views/mixins-multiple-object.txt b/docs/ref/class-based-views/mixins-multiple-object.txt index b28bd11a71..67ca5429fa 100644 --- a/docs/ref/class-based-views/mixins-multiple-object.txt +++ b/docs/ref/class-based-views/mixins-multiple-object.txt @@ -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 diff --git a/docs/ref/class-based-views/mixins-single-object.txt b/docs/ref/class-based-views/mixins-single-object.txt index bbe930d79e..1fce24acc5 100644 --- a/docs/ref/class-based-views/mixins-single-object.txt +++ b/docs/ref/class-based-views/mixins-single-object.txt @@ -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, |
