On Tue, 2008-09-30 at 13:08 -0700, krylatij wrote:
> I have model with 3 fields - id, name_ru, name_en
> I want rename 'name_ru' field to 'name' in query
> i try this:
>      operations =
> OperationType.objects.values('id').extra(select={'name': 'name_ru'})
> 
> but it returns only 'id'
> what's wrong??

You asked to it to only return the 'id' value, right there in the
queryset. If you also want it to return the 'name' value, then you
should set up the extra() bit first and then call values('id', 'name').

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to