diff potd/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 2d35e5f97a99
children
line wrap: on
line diff
--- a/potd/models.py	Sat Dec 26 15:28:16 2015 -0600
+++ b/potd/models.py	Sat Dec 26 21:33:55 2015 -0600
@@ -14,6 +14,7 @@
 from django.db import models
 from django.contrib.auth.models import User
 from django.core.files.base import ContentFile
+from django.core.urlresolvers import reverse
 
 POTD_THUMB_WIDTH = 120
 
@@ -42,9 +43,8 @@
     def __unicode__(self):
         return u'%s (%s)' % (self.caption, self.pk)
 
-    @models.permalink
     def get_absolute_url(self):
-        return ('potd-archive', [str(self.id)])
+        return reverse('potd-archive', args=[str(self.id)])
 
     def save(self, *args, **kwargs):
         if not self.pk: