]> git.sommitrealweird.co.uk Git - sommitrealweird.git/commitdiff
add default sort ordering for blog entries
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 17 Feb 2008 21:02:03 +0000 (21:02 +0000)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 17 Feb 2008 21:02:03 +0000 (21:02 +0000)
sommitrealweird/blog/models.py

index 6b0d2544f7630eed51f5f6ef40b1b970399afbcf..757367423f49ed207a033785c9367152a81e6b72 100644 (file)
@@ -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)
 
     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
 
     class Admin:
         pass