]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/models/user.py
Fixes OSQA-663, the user.username property should pass through the smart_unicode...
[osqa.git] / forum / models / user.py
index b5bef173c3e2e0a1d5ff39c2e442e0729ab7ba7f..ae8f9387d2d4fe82d492595eb98722ad9f2f9c63 100644 (file)
@@ -205,7 +205,11 @@ class User(BaseModel, DjangoUser):
 
     @models.permalink
     def get_asked_url(self):
-        return ('user_questions', (), {'mode': _('asked-by'), 'user': self.id, 'slug': slugify(self.username)})
+        return ('user_questions', (), {'mode': _('asked-by'), 'user': self.id, 'slug': slugify(smart_unicode(self.username))})
+
+    @models.permalink
+    def get_user_subscriptions_url(self):
+        return ('user_subscriptions', (), { 'id': self.id, 'slug': slugify(smart_unicode(self.username))})
 
     @models.permalink
     def get_answered_url(self):