Mercurial > public > sg101
diff bio/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 | 0b6bf9c5a982 |
children |
line wrap: on
line diff
--- a/bio/models.py Sat Dec 26 15:28:16 2015 -0600 +++ b/bio/models.py Sat Dec 26 21:33:55 2015 -0600 @@ -9,6 +9,7 @@ from django.contrib.auth.models import User from django.conf import settings from django.core.cache import cache +from django.core.urlresolvers import reverse from django.template.loader import render_to_string from core.markup import SiteMarkup @@ -137,9 +138,8 @@ if content_update: notify_profile_content_update(self) - @models.permalink def get_absolute_url(self): - return ('bio-view_profile', (), {'username': self.user.username}) + return reverse('bio-view_profile', kwargs={'username': self.user.username}) def badge_ownership(self): return BadgeOwnership.objects.filter(profile=self).select_related('badge')