summaryrefslogtreecommitdiff
path: root/news/models.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-09-20 16:10:09 -0500
committerDan McGee <dan@archlinux.org>2010-09-21 09:10:02 -0500
commit41dc37c8126f062257ce7d5fc8fcf84286b55a88 (patch)
treec73e8f661ffb68d036f528257148243036b28a82 /news/models.py
parent7c92ddbd3c86d6aaa34abd4b2d3f12775801b50b (diff)
Update news views to use slug instead of ID
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'news/models.py')
-rw-r--r--news/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/news/models.py b/news/models.py
index 88794cbb..6c8a7039 100644
--- a/news/models.py
+++ b/news/models.py
@@ -12,7 +12,7 @@ class News(models.Model):
content = models.TextField()
def get_absolute_url(self):
- return '/news/%i/' % self.id
+ return '/news/%s/' % self.slug
def __unicode__(self):
return self.title