daily pastebin goal
38%
SHARE
TWEET

Untitled

a guest Jun 5th, 2017 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def auth_login(request):
  2.  
  3.         if request.user.id:
  4.                 return render_to_response('index.html',{},context_instance=RequestContext(request, {}))
  5.  
  6.         if request.POST:
  7.                 agent = request.POST.get('alias')
  8.                 agent_password = request.POST.get('password')
  9.                 u = authenticate(username=agent, password=agent_password)
  10.                 if u is not None:
  11.                         if u.is_active:
  12.                                 login(request, u)
  13.  
  14.  
  15.                         return render_to_response('index.html',{},context_instance=RequestContext(request, {}))
  16.  
  17.                 return render_to_response('login.html',{},context_instance=RequestContext(request, {}))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top