filter in descending order limit django sql code example
Example 1: django desc order
Obj.objects.all().order_by('-id')
Example 2: django order by
class Meta:
ordering = ('date',)
Obj.objects.all().order_by('-id')
class Meta:
ordering = ('date',)