@ssl_login_shortcut
@ensure_csrf_cookie
@xframe_options_deny
def login_page(request):
 csrf_token = csrf(request)['csrf_token']
 if (settings.FEATURES['AUTH_USE_CERTIFICATES'] and ssl_get_cert_from_request(request)):
  next_url = request.GET.get('next')
  if next_url:
   return redirect(next_url)
  else:
   return redirect('/course/')
 if settings.FEATURES.get('AUTH_USE_CAS'):
  return redirect(reverse('cas-login'))
 return render_to_response('login.html', {'csrf': csrf_token, 'forgot_password_link': '//{base}/login#forgot-password-modal'.format(base=settings.LMS_BASE), 'platform_name': configuration_helpers.get_value('platform_name', settings.PLATFORM_NAME)})

@ ssl_login_shortcut @ ensure_csrf_cookie @ xframe_options_deny def login_page ( request ) : csrf_token = csrf ( request ) [ 'csrf_token' ] if ( settings . FEATURES [ 'AUTH_USE_CERTIFICATES' ] and ssl_get_cert_from_request ( request ) ) : next_url = request . GET . get ( 'next' ) if next_url : return redirect ( next_url ) else : return redirect ( '/course/' ) if settings . FEATURES . get ( 'AUTH_USE_CAS' ) : return redirect ( reverse ( 'cas-login' ) ) return render_to_response ( 'login.html' , { 'csrf' : csrf_token , 'forgot_password_link' : '//{base}/login#forgot-password-modal' . format ( base = settings . LMS_BASE ) , 'platform_name' : configuration_helpers . get_value ( 'platform_name' , settings . PLATFORM_NAME ) } )
display the login form .