From: Brett Parker Date: Sun, 17 Feb 2008 21:02:03 +0000 (+0000) Subject: add default sort ordering for blog entries X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/commitdiff_plain/92bdd2925f6401b3d5447731424f1e11a5c4643e?ds=inline add default sort ordering for blog entries --- diff --git a/sommitrealweird/blog/models.py b/sommitrealweird/blog/models.py index 6b0d254..7573674 100644 --- a/sommitrealweird/blog/models.py +++ b/sommitrealweird/blog/models.py @@ -24,6 +24,9 @@ class BlogEntry(models.Model): def get_absolute_url(self): return u'%s%04d/%02d/%02d/%s/' %(settings.BLOG_ROOT, self.publish_date.year, self.publish_date.month, self.publish_date.day, self.slug) + class Meta: + ordering = ['-publish_date'] + class Admin: pass