xxxxxxxxxx
models.Shop.objects.order_by().values('city').distinct()
xxxxxxxxxx
# Count Avg Sum etc. take a distinct argument for finding unique values
p = Project.objects.all().annotate(Avg('unit__name', distinct=True))
xxxxxxxxxx
unique_queryset = MyModel.objects.all().distinct()
unique_values = MyModel.objects.values('field_name').distinct()