Commit 7befbd06 authored by Floréal Cabanettes's avatar Floréal Cabanettes

Remove csrf token cookie (or try...)

parent 5ef52960
......@@ -18,7 +18,9 @@ class LoginView(FormView):
user = form.login()
if user is not None:
login(request, user)
return redirect(request.POST["next"] if request.POST["next"] != "" else "/")
response = redirect(request.POST["next"] if request.POST["next"] != "" else "/")
response.delete_cookie("csrftoken")
return response
else:
return render(request, 'website/login.html', {'form': form, "site_name": SITE_NAME,
"next": request.POST['next']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment