summaryrefslogtreecommitdiff
path: root/news/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-15 09:04:00 -0500
committerDan McGee <dan@archlinux.org>2010-09-15 09:04:00 -0500
commit8a3bd1ad8a702aabebbfacca51a57883b6d3214e (patch)
treee3492f20cf2a2942ac80f34008b9f082ccb024cf /news/models.py
parentb084936ad9a1e5d7edfcfeb3495b997cb2fe368b (diff)
Spruce up news admin view
Add last modified date as a column, and fix up some other small display, sorting, and ordering issues. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'news/models.py')
-rw-r--r--news/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/news/models.py b/news/models.py
index f2b91b83..ea014492 100644
--- a/news/models.py
+++ b/news/models.py
@@ -4,7 +4,7 @@ from django.contrib.auth.models import User
class News(models.Model):
id = models.AutoField(primary_key=True)
author = models.ForeignKey(User, related_name='news_author')
- postdate = models.DateTimeField(auto_now_add=True, db_index=True)
+ postdate = models.DateTimeField("post date", auto_now_add=True, db_index=True)
last_modified = models.DateTimeField(editable=False,
auto_now=True, db_index=True)
title = models.CharField(max_length=255)
@@ -20,6 +20,6 @@ class News(models.Model):
db_table = 'news'
verbose_name_plural = 'news'
get_latest_by = 'postdate'
- ordering = ['-postdate', '-id']
+ ordering = ['-postdate']
# vim: set ts=4 sw=4 et: