Commit b2af990d by Usman Khalid

If setting COURSES_ARE_BROWSABLE is off return 404 on /courses

parent 3ff203d1
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import Http404
from django.shortcuts import redirect
from django_future.csrf import ensure_csrf_cookie
from mitxmako.shortcuts import render_to_response
......@@ -48,6 +49,9 @@ def courses(request):
if settings.MITX_FEATURES.get('ENABLE_MKTG_SITE', False):
return redirect(marketing_link('COURSES'), permanent=True)
if not settings.MITX_FEATURES.get('COURSES_ARE_BROWSABLE'):
raise Http404
university = branding.get_university(request.META.get('HTTP_HOST'))
if university == 'edge':
return render_to_response('university_profile/edge.html', {})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment