def login(request): """ Login the user and redirect him to the homepage :Rest Types: ``GET`` :URL: ``^login/$`` """ if request.user.is_active: return HttpResponseRedirect('/') else: return base_login(request)
def login_view(request): return base_login(request, authentication_form=AuthenticationForm)
def custom_login(request): if is_ip_banned(request): messages.error(request, "Your account was disabled.") return redirect('home') else: return base_login(request)