diff --git a/common/djangoapps/student/views.py b/common/djangoapps/student/views.py index 44877ef597..472bef7dac 100644 --- a/common/djangoapps/student/views.py +++ b/common/djangoapps/student/views.py @@ -333,6 +333,14 @@ def change_enrollment(request): return {'success': False, 'error': 'We weren\'t able to unenroll you. Please try again.'} +@ensure_csrf_cookie +def accounts_login(request, error=""): + + + return render_to_response('accounts_login.html', { 'error': error }) + + + # Need different levels of logging @ensure_csrf_cookie def login_user(request, error=""): diff --git a/lms/envs/common.py b/lms/envs/common.py index 1b1be28ead..26941f7e01 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -187,6 +187,9 @@ DEBUG_TRACK_LOG = False MITX_ROOT_URL = '' +LOGIN_REDIRECT_URL = MITX_ROOT_URL + '/accounts/login' +LOGIN_URL = MITX_ROOT_URL + '/accounts/login' + COURSE_NAME = "6.002_Spring_2012" COURSE_NUMBER = "6.002x" COURSE_TITLE = "Circuits and Electronics" diff --git a/lms/templates/accounts_login.html b/lms/templates/accounts_login.html new file mode 100644 index 0000000000..011ca643c6 --- /dev/null +++ b/lms/templates/accounts_login.html @@ -0,0 +1,92 @@ +<%! from django.core.urlresolvers import reverse %> +<%inherit file="main.html" /> +<%namespace name='static' file='static_content.html'/> + +<%block name="headextra"> + + + + + + diff --git a/lms/urls.py b/lms/urls.py index 92abdf794b..baa720028b 100644 --- a/lms/urls.py +++ b/lms/urls.py @@ -37,6 +37,8 @@ urlpatterns = ('', url(r'^event$', 'track.views.user_track'), url(r'^t/(?P