Fixed #20408 -- Clarified that values_list() doesn't return a list.

Thanks marktranchant, bmispelon, and alextreme.
This commit is contained in:
Aymeric Augustin 2013-05-18 12:45:06 +02:00
parent 0b0741602b
commit 7b85ef9dfb
1 changed files with 5 additions and 0 deletions

View File

@ -544,6 +544,11 @@ It is an error to pass in ``flat`` when there is more than one field.
If you don't pass any values to ``values_list()``, it will return all the If you don't pass any values to ``values_list()``, it will return all the
fields in the model, in the order they were declared. fields in the model, in the order they were declared.
Note that this method returns a ``ValuesListQuerySet``. This class behaves
like a list. Most of the time this is enough, but if you require an actual
Python list object, you can simply call ``list()`` on it, which will evaluate
the queryset.
dates dates
~~~~~ ~~~~~