django queryset get distinct values of three fields code example Example: django models distinct q = XXXModels.objects.values('{filed}').distinct()