Is there any simple way to reverse the order of a queryset in Django?
Example:
li = [1, 2, 3]
queryset = Collection.objects.filter(pk__in=li)
Is there any simple way to reverse the order of a queryset in Django?
Example:
li = [1, 2, 3]
queryset = Collection.objects.filter(pk__in=li)
To reverse qs
If for some reason you don't want to use order_by then reverse list
You can use
or