summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2017-11-23 21:26:39 +0300
committerLuke Plant <L.Plant.98@cantab.net>2017-11-23 21:37:51 +0300
commit9d67bfadf897d4eb082b398fe9482fc6753c7bf2 (patch)
tree7331c0aa330d53159193a1fc70d0cf6fe47a4b69
parent1738592bd05d2526724ded69346d8548197ae49d (diff)
downloaddjango-stable/1.10.x.tar.gz
[1.10.x] Linked to prefetch_related_objects func in DB optimization docs.stable/1.10.x
Backport of e283c1a from master
-rw-r--r--docs/topics/db/optimization.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/topics/db/optimization.txt b/docs/topics/db/optimization.txt
index 66326f2fb1..93fe61643b 100644
--- a/docs/topics/db/optimization.txt
+++ b/docs/topics/db/optimization.txt
@@ -195,12 +195,13 @@ Understand :meth:`~django.db.models.query.QuerySet.select_related` and
:meth:`~django.db.models.query.QuerySet.prefetch_related` thoroughly, and use
them:
-* in view code,
-
-* and in :doc:`managers and default managers </topics/db/managers>` where
+* in :doc:`managers and default managers </topics/db/managers>` where
appropriate. Be aware when your manager is and is not used; sometimes this is
tricky so don't make assumptions.
+* in view code or other layers, possibly making use of
+ :func:`~django.db.models.prefetch_related_objects` where needed.
+
Don't retrieve things you don't need
====================================