Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #2609 -- Improved docs/sites.txt CurrentSiteManager to explain …

…gotcha with models.Manager

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 452847a6591596313b29b8cf290216047980ea30 1 parent 5e69536
@adrianholovaty adrianholovaty authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 docs/sites.txt
11 docs/sites.txt
@@ -266,7 +266,18 @@ this::
If you attempt to use ``CurrentSiteManager`` and pass a field name that doesn't
exist, Django will raise a ``ValueError``.
+Finally, note that you'll probably want to keep a normal (non-site-specific)
+``Manager`` on your model, even if you use ``CurrentSiteManager``. As explained
+in the `manager documentation`_, if you define a manager manually, then Django
+won't create the automatic ``objects = models.Manager()`` manager for you.
+Also, note that certain parts of Django -- namely, the Django admin site and
+generic views -- use whichever manager is defined *first* in the model, so if
+you want your admin site to have access to all objects (not just site-specific
+ones), put ``objects = models.Manager()`` in your model, before you define
.. _manager:
+.. _manager documentation:
How Django uses the sites framework

0 comments on commit 452847a

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