Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.2.X] Some small fixes to DB optimization docs.

Backport of [15122] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15123 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit fa4ac6f80ca0417b04106626c854f09a6f15879d 1 parent 2d85453
Luke Plant authored December 31, 2010

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  docs/topics/db/optimization.txt
5  docs/topics/db/optimization.txt
@@ -191,7 +191,7 @@ Don't overuse ``count()`` and ``exists()``
191 191
 
192 192
 If you are going to need other data from the QuerySet, just evaluate it.
193 193
 
194  
-For example, assuming an Email class that has a ``body`` attribute and a
  194
+For example, assuming an Email model that has a ``body`` attribute and a
195 195
 many-to-many relation to User, the following template code is optimal:
196 196
 
197 197
 .. code-block:: html+django
@@ -212,7 +212,8 @@ many-to-many relation to User, the following template code is optimal:
212 212
 
213 213
 It is optimal because:
214 214
 
215  
- 1. Since QuerySets are lazy, this does no database if 'display_inbox' is False.
  215
+ 1. Since QuerySets are lazy, this does no database queries if 'display_inbox'
  216
+    is False.
216 217
 
217 218
  #. Use of ``with`` means that we store ``user.emails.all`` in a variable for
218 219
     later use, allowing its cache to be re-used.

0 notes on commit fa4ac6f

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