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.
This commit is contained in:
@@ -511,7 +511,7 @@ def password_reset(request):
|
||||
form.save(use_https = request.is_secure(),
|
||||
from_email = settings.DEFAULT_FROM_EMAIL,
|
||||
request = request,
|
||||
domain_override = settings.SITE_NAME)
|
||||
domain_override = request.get_host())
|
||||
return HttpResponse(json.dumps({'success':True,
|
||||
'value': render_to_string('registration/password_reset_done.html', {})}))
|
||||
else:
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{% trans "Please go to the following page and choose a new password:" %}
|
||||
{% 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 %}
|
||||
{% trans "Your username, in case you've forgotten:" %} {{ user.username }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user