diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index e7864337b3..ce15a2a003 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -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: diff --git a/lms/templates/registration/password_reset_email.html b/lms/templates/registration/password_reset_email.html index dba3879281..6d906c84ff 100644 --- a/lms/templates/registration/password_reset_email.html +++ b/lms/templates/registration/password_reset_email.html @@ -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 }}