diff options
author | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-09-19 16:33:46 -0600 |
---|---|---|
committer | Adolfo Fitoria <adolfo.fitoria@gmail.com> | 2012-09-19 16:35:04 -0600 |
commit | e9c28faa51a693c769f7f9e11132f660ccc713f3 (patch) | |
tree | aa40ba3982287ab16f5ec35b2c8cee97e3164423 | |
parent | 790fc2a8ad97429d0e897f0025e9af73f73562cf (diff) | |
download | askbot-e9c28faa51a693c769f7f9e11132f660ccc713f3.tar.gz askbot-e9c28faa51a693c769f7f9e11132f660ccc713f3.tar.bz2 askbot-e9c28faa51a693c769f7f9e11132f660ccc713f3.zip |
added html email to authopenid
-rw-r--r-- | askbot/deps/django_authopenid/views.py | 8 | ||||
-rw-r--r-- | askbot/skins/common/templates/authopenid/email_validation.html | 20 | ||||
-rw-r--r-- | askbot/skins/common/templates/authopenid/email_validation.txt | 14 |
3 files changed, 24 insertions, 18 deletions
diff --git a/askbot/deps/django_authopenid/views.py b/askbot/deps/django_authopenid/views.py index 5498c792..e5c7df6c 100644 --- a/askbot/deps/django_authopenid/views.py +++ b/askbot/deps/django_authopenid/views.py @@ -46,7 +46,7 @@ from django.utils.encoding import smart_unicode from django.utils.html import escape from django.utils.translation import ugettext as _ from django.utils.safestring import mark_safe -from django.core.mail import send_mail +from askbot.mail import send_mail from recaptcha_works.decorators import fix_recaptcha_remote_ip from askbot.skins.loaders import render_into_skin, get_template from askbot.deps.django_authopenid.ldap_auth import ldap_create_user @@ -385,7 +385,7 @@ def signin(request, template_name='authopenid/signin.html'): user_info = ldap_authenticate(username, password) if user_info['success']: if askbot_settings.LDAP_AUTOCREATE_USERS: - #create new user or + #create new user or user = ldap_create_user(user_info).user user = authenticate(method='force', user_id=user.id) assert(user is not None) @@ -404,7 +404,7 @@ def signin(request, template_name='authopenid/signin.html'): user_info['last_name'] return finalize_generic_signin( request, - login_provider_name = 'ldap', + login_provider_name = 'ldap', user_identifier = ldap_username + '@ldap', redirect_url = next_url ) @@ -1179,7 +1179,7 @@ def send_email_key(email, key, handler_url_name='user_account_recover'): reverse(handler_url_name) +\ '?validation_code=' + key } - template = get_template('authopenid/email_validation.txt') + template = get_template('authopenid/email_validation.html') message = template.render(data) send_mail(subject, message, django_settings.DEFAULT_FROM_EMAIL, [email]) diff --git a/askbot/skins/common/templates/authopenid/email_validation.html b/askbot/skins/common/templates/authopenid/email_validation.html new file mode 100644 index 00000000..616b285f --- /dev/null +++ b/askbot/skins/common/templates/authopenid/email_validation.html @@ -0,0 +1,20 @@ +{% extends "email/base_mail.html"%} +{% block title %}{% trans %}Greetings from the Q&A forum{% endtrans %},{%endblock%} +{% block headline%}{% trans %}Greetings from the Q&A forum{% endtrans %},{%endblock%} + +{%block content%} + +<p>{% trans %}To make use of the Forum, please follow the link below:{% endtrans %}</p> + +<p><a href="{{validation_link}}" >{{validation_link}}</a></p> + +<p>{% trans %}Following the link above will help us verify your email address.{% endtrans %}</p> + +<p>{% trans %}If you believe that this message was sent in mistake - +no further action is needed. Just ignore this email, we apologize +for any inconvenience{% endtrans %}</p> +{%endblock%} + +{%block footer %} +{% include "email/footer.html" %} +{% endblock %} diff --git a/askbot/skins/common/templates/authopenid/email_validation.txt b/askbot/skins/common/templates/authopenid/email_validation.txt deleted file mode 100644 index bd68c61a..00000000 --- a/askbot/skins/common/templates/authopenid/email_validation.txt +++ /dev/null @@ -1,14 +0,0 @@ -{% trans %}Greetings from the Q&A forum{% endtrans %}, - -{% trans %}To make use of the Forum, please follow the link below:{% endtrans %} - -{{validation_link}} - -{% trans %}Following the link above will help us verify your email address.{% endtrans %} - -{% trans %}If you believe that this message was sent in mistake - -no further action is needed. Just ignore this email, we apologize -for any inconvenience{% endtrans %} - -{% trans %}Sincerely, -Q&A Forum Administrator{% endtrans %} |