I am wondering how to get distinct values for a ForeignKey field

For example:
class ModelA(models.Model):
        .........................
        city=models.ForeignKey(City)

I understand that I can pass the list to template than probably use
regroup and get the group values, but is there a efficient way to
handle this without using SQL statement?

Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to