diff --git a/lms/djangoapps/branding/views.py b/lms/djangoapps/branding/views.py index 1b29b8eb09..dd57e8d4d4 100644 --- a/lms/djangoapps/branding/views.py +++ b/lms/djangoapps/branding/views.py @@ -6,6 +6,7 @@ from django_future.csrf import ensure_csrf_cookie import student.views import branding import courseware.views +from mitxmako.shortcuts import marketing_link from util.cache import cache_if_anonymous @@ -36,9 +37,12 @@ def index(request): @cache_if_anonymous def courses(request): """ - Render the "find courses" page. If subdomain branding is on, this is the - university profile page, otherwise it's the edX courseware.views.courses page + Render the "find courses" page. If the marketing site is enabled, redirect + to that. Otherwise, if subdomain branding is on, this is the university + profile page. Otherwise, it's the edX courseware.views.courses page """ + if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE', False): + return redirect(marketing_link('COURSES'), permanent=True) university = branding.get_university(request.META.get('HTTP_HOST')) if university is None: