#8144: values_list doesn't give the full object when requested
---------------------------------------------------+------------------------
Reporter: kcarnold | Owner: nobody
Status: closed | Milestone:
Component: Database layer (models, ORM) | Version: SVN
Resolution: wontfix | Keywords: values_list
Stage: Design decision needed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Changes (by mtredinnick):
* status: new => closed
* resolution: => wontfix
Comment:
This would be a backwards-incompatible change and not necessarily
desirable behaviour for everybody. Also, `values_list()` is just another
presentation for of `values()`, so should always mirror that (and changing
`values()` behaviour would affect a ''lot'' of people). The solution here
is to write your own `QuerySet` subclass that does the conversion you're
after.
One day, maybe, if there's a really good API, we might support this in
core, but, really, `values()` and `values_list()` return raw values
intentionally. If you want Python objects, just use a normal !QuerySet.
--
Ticket URL: <http://code.djangoproject.com/ticket/8144#comment:2>
Django <http://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 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
-~----------~----~----~----~------~----~------~--~---