]> git.sommitrealweird.co.uk Git - sommitrealweird.git/blobdiff - sommitrealweird/blog/models.py
add default sort ordering for blog entries
[sommitrealweird.git] / 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)
 
+    class Meta:
+        ordering = ['-publish_date']
+
     class Admin:
         pass