CourtBookingLog.objects.order_by('customer_id).distinct('customer_id') django syntax error code example
Example: django models distinct
q = XXXModels.objects.values('{filed}').distinct()
q = XXXModels.objects.values('{filed}').distinct()