SyntaxFix
Write A Post
Hire A Developer
Questions
It's quite simple actually if you're using PostgreSQL, just use distinct(columns) (documentation).
distinct(columns)
Productorder.objects.all().distinct('category')
Note that this feature has been included in Django since 1.4