django get all distinct values from model code example Example: django models distinct q = XXXModels.objects.values('{filed}').distinct()