Opened 15 years ago
Last modified 12 years ago
#12222 closed
rename items in values() — at Initial Version
Reported by: | anonymous | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I wish there were a way to do instead of this:
MyModel.objects.values('otherfieldanotherjoinedfieldblahderpfoodoop')
{'otherfieldanotherjoinedfieldblahderpfoodoop': 4, 'otherfieldanotherjoinedfieldblahderpfoodoop': 5, [...]
you could do this:
MyModel.objects.values(val='otherfieldanotherjoinedfieldblahderpfoodoop')
{'val': 4, 'val': 5, [...]
Note:
See TracTickets
for help on using tickets.