Есть модель:
class Articles(models.Model):
lang = models.ForeignKey(Lang)
category = models.ForeignKey(Categories)
title = models.CharField(maxlength=200)
url = models.URLField()
publication = models.CharField(maxlength=32, choices=PUBLICATION_CHOICES, radio_admin=True, default='Published')
created = models.DateField(auto_now_add=True)
class Admin:
ordering =
list_display = ('title', ‘lang’, ‘url’,'publication')
list_filter = ('created','publication',)
def __str__(self):
return self.title
и view
docs = Articles.objects.all().filter(lang__lang__exact=language, category__name=categ)
Как мне отсортировать статьи по дате?