From b3cc34c3d4b7e6b57ec66c0f7b62f97629be5d82 Mon Sep 17 00:00:00 2001 From: ichuang Date: Sun, 1 Jul 2012 13:16:09 -0400 Subject: [PATCH] add debugging to courseware debug (tricky with https behind gunicorn) --- lms/djangoapps/courseware/views.py | 10 ++++++---- lms/envs/dev_ike.py | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lms/djangoapps/courseware/views.py b/lms/djangoapps/courseware/views.py index b0cc639d29..aa6b8e7001 100644 --- a/lms/djangoapps/courseware/views.py +++ b/lms/djangoapps/courseware/views.py @@ -294,10 +294,12 @@ def index(request, course=None, chapter=None, section=None, defsection = multicourse_settings.get_course_default_section(course) if defchapter and defsection: # jump there using redirect, so the user gets the right URL in their browser - return redirect('%s/courseware/%s/%s/%s/' % (settings.MITX_ROOT_URL, - get_course(request, course), - defchapter, - defsection)) + newurl = '%s/courseware/%s/%s/%s/' % (settings.MITX_ROOT_URL, + get_course(request, course), + defchapter, + defsection) + log.debug('redirecting to %s' % newurl) + return redirect(newurl) chapter = clean(chapter) section = clean(section) diff --git a/lms/envs/dev_ike.py b/lms/envs/dev_ike.py index 6d4d276501..2e7721adaf 100644 --- a/lms/envs/dev_ike.py +++ b/lms/envs/dev_ike.py @@ -18,7 +18,8 @@ from .logsettings import get_logger_config from .dev import * if 'eecs1' in socket.gethostname(): - MITX_ROOT_URL = '/mitx2' + # MITX_ROOT_URL = '/mitx2' + MITX_ROOT_URL = 'https://mitx2' #----------------------------------------------------------------------------- # edx4edx content server