Mercurial > public > sg101
diff downloads/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 | 5ba2508939f7 |
children | f0ac48aa8c64 |
line wrap: on
line diff
--- a/downloads/models.py Sat Dec 26 15:28:16 2015 -0600 +++ b/downloads/models.py Sat Dec 26 21:33:55 2015 -0600 @@ -4,8 +4,9 @@ import os 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 from django.template.defaultfilters import filesizeformat from core.markup import site_markup @@ -108,9 +109,8 @@ def __unicode__(self): return self.title - @models.permalink def get_absolute_url(self): - return ('downloads-details', [str(self.id)]) + return reverse('downloads-details', args=[str(self.pk)]) def vote(self, vote_value): """receives a vote_value and updates internal score accordingly"""