Mercurial > public > sg101
changeset 1002:28d68f97cb26
Don't use models.permalink.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 26 Nov 2015 00:47:33 -0600 |
parents | c6c3ba5cf6eb |
children | fa52bfb28217 |
files | news/models.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/news/models.py Thu Nov 26 00:27:42 2015 -0600 +++ b/news/models.py Thu Nov 26 00:47:33 2015 -0600 @@ -3,6 +3,7 @@ """ import datetime +from django.core.urlresolvers import reverse from django.db import models from django.contrib.auth.models import User from tagging.fields import TagField @@ -97,9 +98,8 @@ db_index=False, help_text="Forum topic used for comments") - @models.permalink def get_absolute_url(self): - return ('news.views.story', [str(self.id)]) + return reverse('news-story', args=[str(self.id)]) def __unicode__(self): return self.title