#12222: rename items in values() ------------------------------------+--------------------------------------- Reporter: anonymous | Owner: nobody Status: closed | Milestone: Component: Uncategorized | Version: 1.1 Resolution: invalid | Keywords: Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ------------------------------------+--------------------------------------- Old description:
> I wish there were a way to do instead of this: > > {{{ > #!python > MyModel.objects.values('otherfield__anotherjoinedfield__blah__derp__foo__doop') > {'otherfield__anotherjoinedfield__blah__derp__foo__doop': 4, > 'otherfield__anotherjoinedfield__blah__derp__foo__doop': 5, [...] > }}} > you could do this: > > {{{ > #!python > MyModel.objects.values(val='otherfield__anotherjoinedfield__blah__derp__foo__doop') > {'val': 4, 'val': 5, [...] > }}} New description: I wish there were a way to do instead of this: {{{ #!python MyModel.objects.values('otherfield__anotherjoinedfield__blah__derp__foo__doop') {'otherfield__anotherjoinedfield__blah__derp__foo__doop': 4, 'otherfield__anotherjoinedfield__blah__derp__foo__doop': 5, [...] }}} you could do this: {{{ #!python MyModel.objects.values(val='otherfield__anotherjoinedfield__blah__derp__foo__doop') {'val': 4, 'val': 5, [...] }}} -- Ticket URL: <http://code.djangoproject.com/ticket/12222#comment:4> 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 django-upda...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=.