Commits

Patrick Samson committed a787676

Substitution of the permalink decorator, no more recommended

  • Participants
  • Parent commits 79ae4e9

Comments (0)

Files changed (4)

 # The short X.Y version.
 version = '3.0'
 # The full version, including alpha/beta/rc tags.
-release = '3.0.1'
+release = '3.0.1.post1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.

postman/__init__.py

 # following PEP 386: N.N[.N]+[{a|b|c|rc}N[.N]+][.postN][.devN]
 VERSION = (3, 0, 1)
 PREREL = ()
-POST = 0
+POST = 1
 DEV = 0
 
 # options

postman/models.py

 except ImportError:
     from postman.future_1_5 import get_user_model
 from django.core.exceptions import ValidationError
+from django.core.urlresolvers import reverse
 from django.db import models
 from django.db.models.query import QuerySet
 try:
     def __unicode__(self):
         return "{0}>{1}:{2}".format(self.obfuscated_sender, self.obfuscated_recipient, Truncator(self.subject).words(5))
 
-    @models.permalink
     def get_absolute_url(self):
-        return ('postman_view', [str(self.pk)])
+        return reverse('postman_view', args=[self.pk])
 
     def is_pending(self):
         """Tell if the message is in the pending state."""
     Usual generic tests.
     """
     def test_version(self):
-        self.assertEqual(sys.modules['postman'].__version__, "3.0.1")
+        self.assertEqual(sys.modules['postman'].__version__, "3.0.1.post1")
 
 
 class BaseTest(TestCase):