]> git.openstreetmap.org Git - osqa.git/commitdiff
notifications improvement, now we make sure that the username has passed through...
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Thu, 14 Apr 2011 21:51:36 +0000 (21:51 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Thu, 14 Apr 2011 21:51:36 +0000 (21:51 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@985 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/skins/default/templates/notifications/answeraccepted.html
forum/views/users.py

index 4ce25a7d59d782c5ee7472b0901f6f1c23666c14..5157bd0addbac8e92d2aa775bac33d8ae50f7992 100644 (file)
@@ -3,7 +3,7 @@
 {% declare %}
     prefix = html.mark_safe(smart_str(settings.EMAIL_SUBJECT_PREFIX))
     answer_author = html.mark_safe(smart_str(answer.author.username))
 {% declare %}
     prefix = html.mark_safe(smart_str(settings.EMAIL_SUBJECT_PREFIX))
     answer_author = html.mark_safe(smart_str(answer.author.username))
-    question = smart_str(answer.question)
+    question = answer.question
     question_title = html.mark_safe(smart_str(question.title))
     accepted_by = html.mark_safe(smart_str(answer.nstate.accepted.by.username))
     accepted_by_link = html.objlink(answer.nstate.accepted.by, style=settings.EMAIL_ANCHOR_STYLE)
     question_title = html.mark_safe(smart_str(question.title))
     accepted_by = html.mark_safe(smart_str(answer.nstate.accepted.by.username))
     accepted_by_link = html.objlink(answer.nstate.accepted.by, style=settings.EMAIL_ANCHOR_STYLE)
index 8766851c31faa021833881ebd3f2f463ff7be8da..d532baf20b70bf3cdd9bb8e051b369ec3e803de9 100644 (file)
@@ -286,7 +286,7 @@ def user_view(template, tab_name, tab_title, tab_description, private=False, tab
         if tabbed:\r
             def url_getter(vu):\r
                 try:\r
         if tabbed:\r
             def url_getter(vu):\r
                 try:\r
-                    return reverse(fn.__name__, kwargs={'id': vu.id, 'slug': slugify(vu.username)})\r
+                    return reverse(fn.__name__, kwargs={'id': vu.id, 'slug': slugify(smart_unicode(vu.username))})\r
                 except NoReverseMatch:\r
                     return reverse(fn.__name__, kwargs={'id': vu.id})\r
 \r
                 except NoReverseMatch:\r
                     return reverse(fn.__name__, kwargs={'id': vu.id})\r
 \r