Order by and distinct at same time in Django

What is this article about?

We can use order by and distinct at same time in Django but left most argument in order by should be matched with the argument passed in distinct.

ex :- filter.order_by(‘column1’, ‘column2’).distinct(‘column1’).values()

Posted in

DjangoWeb Development

Submitted by

Manikanta

Why trying to master digital Marketing, when LeadMirror with A2i can help you get there with ease?

Join Lead Mirror Today

Setting up your account takes less than a minute.