-
-@cache.never_cache
-def simple_login(request):
- if request.method == "GET":
- #next = request.REQUEST.get('next', '')
- #if next == '':
- form = AuthenticationForm(prefix='login')
- return render_to_response('auth/login.html', locals(),
- context_instance=RequestContext(request))
- #else:
- # return HttpResponseRedirect("/"+next)
-
- elif request.method == "POST":
- form = AuthenticationForm(data=request.POST, prefix='login')
- if form.is_valid():
- auth.login(request, form.get_user())
- url = request.META['HTTP_REFERER'].split("next=")[1]
- url = url.replace("%3F","?").replace("%3D","=")
- return HttpResponseRedirect(url)
-
-