| 1817 | | If you use custom ``Manager`` objects, take note that the first ``Manager`` |
|---|
| 1818 | | Django encounters (in order by which they're defined in the model) has a |
|---|
| 1819 | | special status. Django interprets the first ``Manager`` defined in a class as |
|---|
| 1820 | | the "default" ``Manager``. Certain operations -- such as Django's admin site -- |
|---|
| 1821 | | use the default ``Manager`` to obtain lists of objects, so it's generally a |
|---|
| 1822 | | good idea for the first ``Manager`` to be relatively unfiltered. In the last |
|---|
| 1823 | | example, the ``people`` ``Manager`` is defined first -- so it's the default |
|---|
| 1824 | | ``Manager``. |
|---|
| | 1818 | If you use custom ``Manager`` objects, take note that the first |
|---|
| | 1819 | ``Manager`` Django encounters (in the order in which they're defined |
|---|
| | 1820 | in the model) has a special status. Django interprets this first |
|---|
| | 1821 | ``Manager`` defined in a class as the "default" ``Manager``, and |
|---|
| | 1822 | several parts of Django (though not the admin application) will use |
|---|
| | 1823 | that ``Manager`` exclusively for that model. As a result, it's often a |
|---|
| | 1824 | good idea to be careful in your choice of default manager, in order to |
|---|
| | 1825 | avoid a situation where overriding of ``get_query_set()`` results in |
|---|
| | 1826 | an inability to retrieve objects you'd like to work with. |
|---|