diff options
author | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-09-18 20:28:50 -0600 |
---|---|---|
committer | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-09-18 20:28:50 -0600 |
commit | 9097d8a9d76bdec9c5414f60acb8c61dc4b2cde0 (patch) | |
tree | 23fd284b20c58dcba0270e2c80974cada2332eb9 /askbot/views/commands.py | |
parent | 33a57fbcb64049a817998411e01cc37cc5315e75 (diff) | |
download | askbot-9097d8a9d76bdec9c5414f60acb8c61dc4b2cde0.tar.gz askbot-9097d8a9d76bdec9c5414f60acb8c61dc4b2cde0.tar.bz2 askbot-9097d8a9d76bdec9c5414f60acb8c61dc4b2cde0.zip |
added templates for hardcoded emails
Diffstat (limited to 'askbot/views/commands.py')
-rw-r--r-- | askbot/views/commands.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/askbot/views/commands.py b/askbot/views/commands.py index e967a080..2ab15c35 100644 --- a/askbot/views/commands.py +++ b/askbot/views/commands.py @@ -32,6 +32,7 @@ from askbot.utils import decorators from askbot.utils import url_utils from askbot.utils.forms import get_db_object_or_404 from askbot import mail +from django.template import Context from askbot.skins.loaders import render_into_skin, get_template from askbot.skins.loaders import render_into_skin_as_string from askbot.skins.loaders import render_text_into_skin @@ -106,17 +107,12 @@ def manage_inbox(request): reject_reason = models.PostFlagReason.objects.get( id = post_data['reject_reason_id'] ) - body_text = string_concat( - _('Your post (copied in the end),'), - '<br/>', - _('was rejected for the following reason:'), - '<br/><br/>', - reject_reason.details.html, - '<br/><br/>', - _('Here is your original post'), - '<br/><br/>', - post.text - ) + template = get_template('email/rejected_post.html') + data = { + 'post': post.html, + 'reject_reason': reject_reason.details.html + } + body_text = template.render(Context(data)) mail.send_mail( subject_line = _('your post was not accepted'), body_text = unicode(body_text), @@ -1355,7 +1351,7 @@ def get_editor(request): #parse out javascript and dom, and return them separately #we need that, because js needs to be added in a special way html_soup = BeautifulSoup(editor_html) - + parsed_scripts = list() for script in html_soup.find_all('script'): parsed_scripts.append({ |