From 190d0fc1543b3cf30c7050602c9a656065a237fe Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 20 Sep 2010 15:27:42 -0500 Subject: Add news slug field Initially, this needs to allow null so that we can add in slugs for all of our old news items. Signed-off-by: Dan McGee --- news/models.py | 1 + 1 file changed, 1 insertion(+) (limited to 'news/models.py') diff --git a/news/models.py b/news/models.py index ea01449..2d96c3d 100644 --- a/news/models.py +++ b/news/models.py @@ -3,6 +3,7 @@ from django.contrib.auth.models import User class News(models.Model): id = models.AutoField(primary_key=True) + slug = models.SlugField(max_length=255, null=True, unique=True) author = models.ForeignKey(User, related_name='news_author') postdate = models.DateTimeField("post date", auto_now_add=True, db_index=True) last_modified = models.DateTimeField(editable=False, -- cgit v1.2.3-24-g4f1b