If you need all the different names, just do the following:
Foo.objects.values('name').distinct()
And you will get a list of dictionaries, each of which has a name . If you need other data, just add more attribute names as parameters to call .values (). Of course, if you add attributes that can change between lines with the same name, you break .distinct ().
, . ; , ? - , Django .