@ensure_csrf_cookie
@cache_if_anonymous()
def courses(request):
 enable_mktg_site = configuration_helpers.get_value('ENABLE_MKTG_SITE', settings.FEATURES.get('ENABLE_MKTG_SITE', False))
 if enable_mktg_site:
  return redirect(marketing_link('COURSES'), permanent=True)
 if (not settings.FEATURES.get('COURSES_ARE_BROWSABLE')):
  raise Http404
 return courseware.views.views.courses(request)

@ ensure_csrf_cookie @ cache_if_anonymous ( ) def courses ( request ) : enable_mktg_site = configuration_helpers . get_value ( 'ENABLE_MKTG_SITE' , settings . FEATURES . get ( 'ENABLE_MKTG_SITE' , False ) ) if enable_mktg_site : return redirect ( marketing_link ( 'COURSES' ) , permanent = True ) if ( not settings . FEATURES . get ( 'COURSES_ARE_BROWSABLE' ) ) : raise Http404 return courseware . views . views . courses ( request )
render the "find courses" page .