This seem a little awkward so I want to make sure I am not missing
anything
in view code
list = MyModel.objects.filter(client__description = 'ACME')
list =
MyModel.objects.select_related().order_by('clients_client.description'))
in template code
mymodel.client.description
The awkward part is that the syntax to refer to the same thing is
specified 3 different ways depending on context
1) client__description
2) 'clients_client.description'
3) client.description
Is this correct or is there a simpler way I am missing?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---