def post(self, request): user = CustomAuthenticationForm(data=request.POST) if user.is_valid(): login(request, user.get_user()) return redirect('index-page') messages.error(request, user.error_messages) return redirect('login')
def post(self, request): user = CustomAuthenticationForm(data=request.POST) if user.is_valid(): login(request, user.get_user()) return redirect("the-main-page")