diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2011-08-26 21:13:01 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2011-08-26 21:13:01 +0000 |
| commit | a4a250a2964eca1815ac93726c46d2021c2644f0 (patch) | |
| tree | 66060cb7ebc02c30cfc53c51d7ca931362f834ce /docs | |
| parent | e0ae9db2722f36969e760619fd97d8604fa94bda (diff) | |
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
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/querysets.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/ref/models/querysets.txt b/docs/ref/models/querysets.txt index 729efc1aa2..054f34878c 100644 --- a/docs/ref/models/querysets.txt +++ b/docs/ref/models/querysets.txt @@ -436,11 +436,11 @@ A few subtleties that are worth mentioning: 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 |
