Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Corrected explanation of values() and extra() interaction in querysets.

Fixes #15546, refs #13455. The original documentation patch
inadvertently muddied the waters in one aspect and this commit tidies
that up.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16697 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a4a250a2964eca1815ac93726c46d2021c2644f0 1 parent e0ae9db
Malcolm Tredinnick authored August 26, 2011

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

  1. 10  docs/ref/models/querysets.txt
10  docs/ref/models/querysets.txt
@@ -436,11 +436,11 @@ A few subtleties that are worth mentioning:
436 436
       ordering can affect the results. See the note in :meth:`distinct` for
437 437
       details.
438 438
 
439  
-    * If you use a ``values()`` clause after an ``extra()`` clause,
440  
-      any fields defined by a ``select`` argument in the ``extra()``
441  
-      must be explicitly included in the ``values()`` clause. However,
442  
-      if the ``extra()`` clause is used after the ``values()``, the
443  
-      fields added by the select will be included automatically.
  439
+    * If you use a ``values()`` clause after an :py:meth:`extra()` call,
  440
+      any fields defined by a ``select`` argument in the :py:meth:`extra()`
  441
+      must be explicitly included in the ``values()`` call. Any
  442
+      :py:meth:`extra()` call made after a ``values()`` call with have its
  443
+      extra selected fields ignored.
444 444
 
445 445
 A ``ValuesQuerySet`` is useful when you know you're only going to need values
446 446
 from a small number of the available fields and you won't need the

0 notes on commit a4a250a

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