Commit f9616c6e by David Ormsbee

Merge pull request #544 from MITx/feature/arjun/fix_password_reset_domain

making password reset email link have the current site's domain rather than edx.org hardcoded.
parents 65c5a21a 202edb0e
...@@ -511,7 +511,7 @@ def password_reset(request): ...@@ -511,7 +511,7 @@ def password_reset(request):
form.save(use_https = request.is_secure(), form.save(use_https = request.is_secure(),
from_email = settings.DEFAULT_FROM_EMAIL, from_email = settings.DEFAULT_FROM_EMAIL,
request = request, request = request,
domain_override = settings.SITE_NAME) domain_override = request.get_host())
return HttpResponse(json.dumps({'success':True, return HttpResponse(json.dumps({'success':True,
'value': render_to_string('registration/password_reset_done.html', {})})) 'value': render_to_string('registration/password_reset_done.html', {})}))
else: else:
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% trans "Please go to the following page and choose a new password:" %} {% trans "Please go to the following page and choose a new password:" %}
{% block reset_link %} {% block reset_link %}
https://www.edx.org{% url 'django.contrib.auth.views.password_reset_confirm' uidb36=uid token=token %} https://{{domain}}{% url 'django.contrib.auth.views.password_reset_confirm' uidb36=uid token=token %}
{% endblock %} {% endblock %}
{% trans "Your username, in case you've forgotten:" %} {{ user.username }} {% trans "Your username, in case you've forgotten:" %} {{ user.username }}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment