Mercurial > public > sg101
diff weblinks/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 | 3e1905e523be |
children |
line wrap: on
line diff
--- a/weblinks/models.py Sat Dec 26 15:28:16 2015 -0600 +++ b/weblinks/models.py Sat Dec 26 21:33:55 2015 -0600 @@ -3,8 +3,9 @@ """ import datetime +from django.contrib.auth.models import User +from django.core.urlresolvers import reverse from django.db import models -from django.contrib.auth.models import User class Category(models.Model): @@ -68,9 +69,8 @@ super(Link, self).save(*args, **kwargs) - @models.permalink def get_absolute_url(self): - return ('weblinks-link_detail', [str(self.id)]) + return reverse('weblinks-link_detail', args=[str(self.pk)]) def search_title(self): return self.title