Author: mtredinnick
Date: 2011-08-26 14:13:01 -0700 (Fri, 26 Aug 2011)
New Revision: 16697
Modified:
django/trunk/docs/ref/models/querysets.txt
Log:
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.
Modified: django/trunk/docs/ref/models/querysets.txt
===================================================================
--- django/trunk/docs/ref/models/querysets.txt 2011-08-26 09:44:40 UTC (rev
16696)
+++ django/trunk/docs/ref/models/querysets.txt 2011-08-26 21:13:01 UTC (rev
16697)
@@ -436,11 +436,11 @@
ordering can affect the results. See the note in :meth:`distinct` for
details.
- * If you use a ``values()`` clause after an ``extra()`` clause,
- any fields defined by a ``select`` argument in the ``extra()``
- must be explicitly included in the ``values()`` clause. However,
- if the ``extra()`` clause is used after the ``values()``, the
- fields added by the select will be included automatically.
+ * If you use a ``values()`` clause after an :py:meth:`extra()` call,
+ any fields defined by a ``select`` argument in the :py:meth:`extra()`
+ must be explicitly included in the ``values()`` call. Any
+ :py:meth:`extra()` call made after a ``values()`` call with have its
+ extra selected fields ignored.
A ``ValuesQuerySet`` is useful when you know you're only going to need values
from a small number of the available fields and you won't need the
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.