summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-06-05 06:58:29 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-06-05 06:58:29 -0400
commit59af35e4a754b50c801c8dc25aeadd06eaef35a4 (patch)
tree97827ffdb91fbd9e5abc9c6322d587a8bf8059c9
parentbec0efc77383afaa7fac9d668a93467e9f22c065 (diff)
downloadaskbot-59af35e4a754b50c801c8dc25aeadd06eaef35a4.tar.gz
askbot-59af35e4a754b50c801c8dc25aeadd06eaef35a4.tar.bz2
askbot-59af35e4a754b50c801c8dc25aeadd06eaef35a4.zip
small corrections in the bounce email
-rw-r--r--askbot/mail/__init__.py7
-rw-r--r--askbot/skins/default/templates/email/insufficient_rep_to_post_by_email.html2
2 files changed, 5 insertions, 4 deletions
diff --git a/askbot/mail/__init__.py b/askbot/mail/__init__.py
index 7e3abbf6..ddf909a7 100644
--- a/askbot/mail/__init__.py
+++ b/askbot/mail/__init__.py
@@ -208,7 +208,7 @@ def bounce_email(email, subject, reason = None, body_text = None):
'site': askbot_settings.APP_SHORT_NAME,
'url': url_utils.get_login_url()
}
- elif reason == 'permission_denied':
+ elif reason == 'permission_denied' and body_text:
error_message = _(
'<p>Sorry, your question could not be posted '
'due to insufficient privileges of your user account</p>'
@@ -216,7 +216,7 @@ def bounce_email(email, subject, reason = None, body_text = None):
else:
raise ValueError('unknown reason to bounce an email: "%s"' % reason)
- if body_text != None:
+ if body_text:
error_message = string_concat(error_message, body_text)
#print 'sending email'
@@ -337,7 +337,8 @@ def process_emailed_question(
#todo: factor this code out
template = get_template('email/insufficient_rep_to_post_by_email.html')
min_rep = askbot_settings.MIN_REP_TO_POST_BY_EMAIL
- min_upvotes = min_rep / askbot_settings.REP_GAIN_FOR_RECEIVING_UPVOTE
+ min_upvotes = 1 + \
+ (min_rep/askbot_settings.REP_GAIN_FOR_RECEIVING_UPVOTE)
data = {
'username': user.username,
'site_name': askbot_settings.APP_SHORT_NAME,
diff --git a/askbot/skins/default/templates/email/insufficient_rep_to_post_by_email.html b/askbot/skins/default/templates/email/insufficient_rep_to_post_by_email.html
index 071cbbdf..0abd8e63 100644
--- a/askbot/skins/default/templates/email/insufficient_rep_to_post_by_email.html
+++ b/askbot/skins/default/templates/email/insufficient_rep_to_post_by_email.html
@@ -4,7 +4,7 @@
* username
* site_name - for the footer
#}
-<p style="{{ macros.heading_style }}">
+<p style="{{ macros.heading_style() }}">
{% trans %}{{ username }}, your question could not be posted by email just yet{% endtrans %}
</p>
<p>