From 0c752a2cab9d10487c87fb7b7c0ffb310c987c0b Mon Sep 17 00:00:00 2001 From: Robert Martin Date: Mon, 22 Apr 2013 16:33:28 -0400 Subject: fix bug where unicode was not marked correctly. The bug caused an exception when Email settings were incorrect, ironically when raise_on_failure=False. --- askbot/mail/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/askbot/mail/__init__.py b/askbot/mail/__init__.py index 60deec68..e5f97deb 100644 --- a/askbot/mail/__init__.py +++ b/askbot/mail/__init__.py @@ -176,7 +176,7 @@ def mail_moderators( msg.content_subtype = 'html' msg.send() except smtplib.SMTPException, error: - sys.stderr.write('\n' + error.encode('utf-8') + '\n') + sys.stderr.write('\n' + unicode(error).encode('utf-8') + '\n') if raise_on_failure == True: raise exceptions.EmailNotSent(unicode(error)) -- cgit v1.2.3-1-g7c22 From 5c4f78cb956f4ff1d18478974129c088cbf69e53 Mon Sep 17 00:00:00 2001 From: Robert Martin Date: Mon, 22 Apr 2013 17:05:10 -0400 Subject: fix some styles in html. The main issue was the missing space before the attribute. The rest is just for less important general improvement of the formatting. --- askbot/templates/question/question_controls.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/askbot/templates/question/question_controls.html b/askbot/templates/question/question_controls.html index 88ef42d8..ddb40e1d 100644 --- a/askbot/templates/question/question_controls.html +++ b/askbot/templates/question/question_controls.html @@ -2,23 +2,23 @@ -{% trans %}retag{% endtrans %} +{% trans %}retag{% endtrans %} {% if question.offensive_flag_count > 0 %} - {% trans %}remove flag{% endtrans %} - {% trans %}flag offensive{% endtrans %} ({{ question.offensive_flag_count }}) {% else %} - @@ -26,11 +26,11 @@ {% endif %} {% if thread.closed %} - {% trans %}reopen{% endtrans %} + {% trans %}reopen{% endtrans %} {% else %} {% trans %}close{% endtrans %} {% endif %} -{% if question.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %} -- cgit v1.2.3-1-g7c22