diff options
Diffstat (limited to 'app/links/models.py')
-rw-r--r-- | app/links/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
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 |