On Sat, Oct 11, 2008 at 8:38 AM, Stephen Cheng
<[EMAIL PROTECTED]>wrote:
>
> I am wondering how to get distinct values for a ForeignKey field
>
> For example:
> class ModelA(models.Model):
>.
>city=models.ForeignKey(City)
>
distinct_cities = ModelA.values('
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 ef
2 matches
Mail list logo