From e5bc8411cc823d497cd26730a0636e82ed877312 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 3 May 2019 13:48:09 -0500 Subject: added better ordering to links --- app/blog/models.py | 2 +- app/links/models.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/blog/models.py b/app/blog/models.py index ee4aca0..238feb0 100644 --- a/app/blog/models.py +++ b/app/blog/models.py @@ -32,7 +32,7 @@ class Entry(models.Model): class Meta: ordering = ('-pub_date',) get_latest_by = 'pub_date' - verbose_name_plural = 'Essays' + verbose_name_plural = 'Entry' def __str__(self): return self.title diff --git a/app/links/models.py b/app/links/models.py index 518ba33..0d17558 100644 --- a/app/links/models.py +++ b/app/links/models.py @@ -22,6 +22,10 @@ class Link(models.Model): ) status = models.IntegerField(choices=PUB_STATUS, default=0) + class Meta: + ordering = ('-pub_date',) + get_latest_by = 'pub_date' + def __str__(self): return self.title -- cgit v1.2.3-70-g09d2