Mercurial > public > sg101
diff shoutbox/models.py @ 1035:eeaf387803c6
Remove usages of @models.permalink.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 26 Dec 2015 21:33:55 -0600 |
parents | 98d2388b6bb2 |
children |
line wrap: on
line diff
--- a/shoutbox/models.py Sat Dec 26 15:28:16 2015 -0600 +++ b/shoutbox/models.py Sat Dec 26 21:33:55 2015 -0600 @@ -5,6 +5,7 @@ from django.db import models from django.contrib.auth.models import User +from django.core.urlresolvers import reverse from django.utils.html import escape, urlize from smiley.utils import smilify_html @@ -24,9 +25,8 @@ return self.shout[:60] + "..." return self.shout - @models.permalink def get_absolute_url(self): - return ('shoutbox-view', [str(self.id)]) + return reverse('shoutbox-view', args=[str(self.pk)]) def save(self, *args, **kwargs): if not self.id: