Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #6541: Corrected documentation of how the admin chooses a defau…

…lt manager. Refs #6538.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7302 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 41d101e9ce10ab08051db47500f24a701b6882e9 1 parent ebf3cde
James Bennett authored

Showing 1 changed file with 9 additions and 8 deletions. Show diff stats Hide diff stats

  1. 17  docs/model-api.txt
17  docs/model-api.txt
@@ -1788,14 +1788,15 @@ For example::
1788 1788
 This example allows you to request ``Person.men.all()``, ``Person.women.all()``,
1789 1789
 and ``Person.people.all()``, yielding predictable results.
1790 1790
 
1791  
-If you use custom ``Manager`` objects, take note that the first ``Manager``
1792  
-Django encounters (in order by which they're defined in the model) has a
1793  
-special status. Django interprets the first ``Manager`` defined in a class as
1794  
-the "default" ``Manager``. Certain operations -- such as Django's admin site --
1795  
-use the default ``Manager`` to obtain lists of objects, so it's generally a
1796  
-good idea for the first ``Manager`` to be relatively unfiltered. In the last
1797  
-example, the ``people`` ``Manager`` is defined first -- so it's the default
1798  
-``Manager``.
  1791
+If you use custom ``Manager`` objects, take note that the first
  1792
+``Manager`` Django encounters (in the order in which they're defined
  1793
+in the model) has a special status. Django interprets this first
  1794
+``Manager`` defined in a class as the "default" ``Manager``, and
  1795
+several parts of Django (though not the admin application) will use
  1796
+that ``Manager`` exclusively for that model. As a result, it's often a
  1797
+good idea to be careful in your choice of default manager, in order to
  1798
+avoid a situation where overriding of ``get_query_set()`` results in
  1799
+an inability to retrieve objects you'd like to work with.
1799 1800
 
1800 1801
 Model methods
1801 1802
 =============

0 notes on commit 41d101e

Please sign in to comment.
Something went wrong with that request. Please try again.