summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJames Bennett <ubernostrum@gmail.com>2008-03-18 19:55:21 +0000
committerJames Bennett <ubernostrum@gmail.com>2008-03-18 19:55:21 +0000
commit41d101e9ce10ab08051db47500f24a701b6882e9 (patch)
tree9c551d0921f59304e9240f8e5e49136c2ff480a0 /docs
parentebf3cdea733c82e2e104cd1417c57a52c54b26e0 (diff)
Fixed #6541: Corrected documentation of how the admin chooses a default manager. Refs #6538.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/model-api.txt17
1 files changed, 9 insertions, 8 deletions
diff --git a/docs/model-api.txt b/docs/model-api.txt
index 4901a9a854..16a45f629e 100644
--- a/docs/model-api.txt
+++ b/docs/model-api.txt
@@ -1788,14 +1788,15 @@ For example::
This example allows you to request ``Person.men.all()``, ``Person.women.all()``,
and ``Person.people.all()``, yielding predictable results.
-If you use custom ``Manager`` objects, take note that the first ``Manager``
-Django encounters (in order by which they're defined in the model) has a
-special status. Django interprets the first ``Manager`` defined in a class as
-the "default" ``Manager``. Certain operations -- such as Django's admin site --
-use the default ``Manager`` to obtain lists of objects, so it's generally a
-good idea for the first ``Manager`` to be relatively unfiltered. In the last
-example, the ``people`` ``Manager`` is defined first -- so it's the default
-``Manager``.
+If you use custom ``Manager`` objects, take note that the first
+``Manager`` Django encounters (in the order in which they're defined
+in the model) has a special status. Django interprets this first
+``Manager`` defined in a class as the "default" ``Manager``, and
+several parts of Django (though not the admin application) will use
+that ``Manager`` exclusively for that model. As a result, it's often a
+good idea to be careful in your choice of default manager, in order to
+avoid a situation where overriding of ``get_query_set()`` results in
+an inability to retrieve objects you'd like to work with.
Model methods
=============