From 614f4540d0d2b22fcf9df0568bfd6112f8bf40a3 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 23 Jul 2012 23:41:45 -0400 Subject: [PATCH 1/3] Place a domain_override to force Django to use edx.org instead of example.com. Django hardcodes the subject line for password reset emails. You're supposed to be able to override it with a properly named template, but that didn't make it into 1.3.1 (which is what we're deploying on now). We're not using the Sites framework at this time, so this was the "fix". --- common/djangoapps/student/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index d0da67f247..27b2a9bb76 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -402,7 +402,8 @@ def password_reset(request): if form.is_valid(): form.save( use_https = request.is_secure(), from_email = settings.DEFAULT_FROM_EMAIL, - request = request ) + request = request, + domain_override = "edx.org" ) return HttpResponse(json.dumps({'success':True, 'value': render_to_string('registration/password_reset_done.html', {})})) else: From 729070763f47c187358e0d1871c3a0960cf19668 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 23 Jul 2012 23:43:34 -0400 Subject: [PATCH 2/3] Convert @mitx.mit.edu emails to @edx.org emails --- cms/envs/common.py | 6 +++--- lms/envs/common.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cms/envs/common.py b/cms/envs/common.py index 0196ddc9e5..896c4515a2 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -132,10 +132,10 @@ IGNORABLE_404_ENDS = ('favicon.ico') # Email EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' -DEFAULT_FROM_EMAIL = 'registration@mitx.mit.edu' -DEFAULT_FEEDBACK_EMAIL = 'feedback@mitx.mit.edu' +DEFAULT_FROM_EMAIL = 'registration@edx.org' +DEFAULT_FEEDBACK_EMAIL = 'feedback@edx.org' ADMINS = ( - ('MITx Admins', 'admin@mitx.mit.edu'), + ('edX Admins', 'admin@edx.org'), ) MANAGERS = ADMINS diff --git a/lms/envs/common.py b/lms/envs/common.py index f0571d19cf..3b005c5dbe 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -158,17 +158,17 @@ TEMPLATE_DEBUG = False # Site info SITE_ID = 1 -SITE_NAME = "localhost:8000" +SITE_NAME = "edx.org" HTTPS = 'on' ROOT_URLCONF = 'lms.urls' IGNORABLE_404_ENDS = ('favicon.ico') # Email EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' -DEFAULT_FROM_EMAIL = 'registration@mitx.mit.edu' -DEFAULT_FEEDBACK_EMAIL = 'feedback@mitx.mit.edu' +DEFAULT_FROM_EMAIL = 'registration@edx.org' +DEFAULT_FEEDBACK_EMAIL = 'feedback@edx.org' ADMINS = ( - ('MITx Admins', 'admin@mitx.mit.edu'), + ('edX Admins', 'admin@edx.org'), ) MANAGERS = ADMINS From f22810524d2b8a75a998ef9c0c8ffcfaef29f71a Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 23 Jul 2012 23:54:35 -0400 Subject: [PATCH 3/3] Use settings.SITE_NAME instead of hardcoded edx.org --- common/djangoapps/student/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 27b2a9bb76..e36bcf4b96 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -403,7 +403,7 @@ def password_reset(request): form.save( use_https = request.is_secure(), from_email = settings.DEFAULT_FROM_EMAIL, request = request, - domain_override = "edx.org" ) + domain_override = settings.SITE_NAME ) return HttpResponse(json.dumps({'success':True, 'value': render_to_string('registration/password_reset_done.html', {})})) else: