Merge pull request #61 from philroche/master

Add __str__ to Notification Model to support Python 3
This commit is contained in:
Yang.Y 2015-05-17 20:58:26 +08:00
commit b8806e07bb
2 changed files with 4 additions and 0 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ dist
MANIFEST
.coverage
htmlcov
/.idea/

View file

@ -211,6 +211,9 @@ class Notification(models.Model):
return u'%(actor)s %(verb)s %(action_object)s %(timesince)s ago' % ctx
return u'%(actor)s %(verb)s %(timesince)s ago' % ctx
def __str__(self):#Adds support for Python 3
return self.__unicode__()
def timesince(self, now=None):
"""
Shortcut for the ``django.utils.timesince.timesince`` function of the