summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-07-27 18:27:16 -0500
committerDan McGee <dan@archlinux.org>2010-07-27 18:27:18 -0500
commit5ed4438c1c68e3b5d1715c0c3c7983df970fe9ac (patch)
tree5c4b1e06b47c783e06f36b49d96f5efb392fe842
parentbb86461a294679324784877d039107f47b3aec90 (diff)
downloadwebsite-5ed4438c1c68e3b5d1715c0c3c7983df970fe9ac.tar.gz
website-5ed4438c1c68e3b5d1715c0c3c7983df970fe9ac.zip
Update model to match reality
I added this index a while back, so add it here too. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--blog/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/blog/models.py b/blog/models.py
index e06b090..ea64cef 100644
--- a/blog/models.py
+++ b/blog/models.py
@@ -28,7 +28,7 @@ class Post(models.Model):
objects = PostManager()
author = models.ForeignKey(User)
title = models.CharField(max_length=100)
- pub_date = models.DateTimeField('date published', default=datetime.now)
+ pub_date = models.DateTimeField('date published', default=datetime.now, db_index=True)
mod_date = models.DateTimeField('date modified', editable=False, auto_now=True)
# can this post be seen publicly?
public = models.BooleanField('public post', default=False)