#20408: values_list(flat=True) returns ValuesListQuerySet, not list
-------------------------------------+-------------------------------------
     Reporter:  marktranchant        |                    Owner:  alextreme
         Type:                       |                   Status:  assigned
  Cleanup/optimization               |                  Version:  1.4
    Component:  Documentation        |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  values_list          |      Needs documentation:  0
  queryset list                      |  Patch needs improvement:  0
    Has patch:  1                    |                    UI/UX:  0
  Needs tests:  0                    |
Easy pickings:  1                    |
-------------------------------------+-------------------------------------

Comment (by bmispelon):

 How about something like that:

 Note that this method returns a VLQS which is an object that 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).

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20408#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/071.2767fab4ef9c50012bd8554856085d9b%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to