git-svn-id: http://code.djangoproject.com/svn/django/trunk@7302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
ebf3cdea73
commit
41d101e9ce
|
@ -1788,14 +1788,15 @@ For example::
|
||||||
This example allows you to request ``Person.men.all()``, ``Person.women.all()``,
|
This example allows you to request ``Person.men.all()``, ``Person.women.all()``,
|
||||||
and ``Person.people.all()``, yielding predictable results.
|
and ``Person.people.all()``, yielding predictable results.
|
||||||
|
|
||||||
If you use custom ``Manager`` objects, take note that the first ``Manager``
|
If you use custom ``Manager`` objects, take note that the first
|
||||||
Django encounters (in order by which they're defined in the model) has a
|
``Manager`` Django encounters (in the order in which they're defined
|
||||||
special status. Django interprets the first ``Manager`` defined in a class as
|
in the model) has a special status. Django interprets this first
|
||||||
the "default" ``Manager``. Certain operations -- such as Django's admin site --
|
``Manager`` defined in a class as the "default" ``Manager``, and
|
||||||
use the default ``Manager`` to obtain lists of objects, so it's generally a
|
several parts of Django (though not the admin application) will use
|
||||||
good idea for the first ``Manager`` to be relatively unfiltered. In the last
|
that ``Manager`` exclusively for that model. As a result, it's often a
|
||||||
example, the ``people`` ``Manager`` is defined first -- so it's the default
|
good idea to be careful in your choice of default manager, in order to
|
||||||
``Manager``.
|
avoid a situation where overriding of ``get_query_set()`` results in
|
||||||
|
an inability to retrieve objects you'd like to work with.
|
||||||
|
|
||||||
Model methods
|
Model methods
|
||||||
=============
|
=============
|
||||||
|
|
Loading…
Reference in New Issue