﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
16735	QuerySet.values() should be aliasable using strings	alex.latchford@…	Ian Foote	"
{{{
Student.objects.all().values('name', 'mother__name', 'class__teacher__name')
> QD {'name': 'Freddie', 'mother__name': 'Helen', 'class__teacher__name': 'Mr Williams'}
}}}


This sort of query doesn't quite demonstrate the problem fully, but it's the best example I can think of for now. Essentially I'd like to be able to alias these values in such a fashion that they are easily distinguishable or able to be shortened.. 

I envisage something like this..


{{{
Student.objects.all().values(student_name='name', mother_name='mother__name', teacher_name='class__teacher__name')
> QD {'student_name': 'Freddie', 'mother_name': 'Helen', 'teacher_name': 'Mr Williams'}
}}}


You should also be able to leave arguments if the standard name will suffice..

Many thanks,
Alex
"	New feature	closed	Database layer (models, ORM)	dev	Normal	wontfix	queryset, alias, values	django@… Ben Davis	Accepted	1	0	0	1	0	0
