From 92bdd2925f6401b3d5447731424f1e11a5c4643e Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Sun, 17 Feb 2008 21:02:03 +0000 Subject: [PATCH 1/1] add default sort ordering for blog entries --- sommitrealweird/blog/models.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.39.5