summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlton Gibson <carlton.gibson@noumenal.es>2020-03-05 16:04:06 +0100
committerCarlton Gibson <carlton.gibson@noumenal.es>2020-03-05 16:04:06 +0100
commitde334079e9f495793902b2c9ec46396a5137a741 (patch)
treecaf3978ae999a44532b614a1418a4946b035682d
parent17009e910538b9c3709d302f54c2d10eb245cf38 (diff)
downloaddjango-ticket-31342.tar.gz
Fixed #31342 -- Clarified base manager docs.ticket-31342
-rw-r--r--docs/topics/db/managers.txt12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/topics/db/managers.txt b/docs/topics/db/managers.txt
index 473965d897..117386ab4a 100644
--- a/docs/topics/db/managers.txt
+++ b/docs/topics/db/managers.txt
@@ -214,11 +214,13 @@ appropriate for your circumstances, you can tell Django which class to use by
setting :attr:`Meta.base_manager_name
<django.db.models.Options.base_manager_name>`.
-Base managers aren't used when querying on related models. For example, if the
-``Question`` model :ref:`from the tutorial <creating-models>` had a ``deleted``
-field and a base manager that filters out instances with ``deleted=True``, a
-queryset like ``Choice.objects.filter(question__name__startswith='What')``
-would include choices related to deleted questions.
+Base managers aren't used when querying on related models, or when
+:ref:`accessing a to-many relationship <backwards-related-objects>`. For
+example, if the ``Question`` model :ref:`from the tutorial <creating-models>`
+had a ``deleted`` field and a base manager that filters out instances with
+``deleted=True``, a queryset like
+``Choice.objects.filter(question__name__startswith='What')`` would include
+choices related to deleted questions.
Don't filter away any results in this type of manager subclass
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~