Answers for "order by desc django model"

6

django desc order

Obj.objects.all().order_by('-id')
Posted by: Guest on August-08-2020
1

django order by

#Add this to your models.py class, and dont remove the comma!
class Meta:
        ordering = ('yourfeild',)
Posted by: Guest on January-31-2021

Python Answers by Framework

Browse Popular Code Answers by Language