django get all query order by first code example Example: django order by class Meta: ordering = ('date',)