Commit 019d4c4b authored by Floréal Cabanettes's avatar Floréal Cabanettes

Remove unused code

parent f4b12e33
......@@ -8,7 +8,6 @@ from website.forms import LoginForm
class LoginView(FormView):
def get(self, request, **kwargs):
return render(request, 'website/login.html', {"site_name": SITE_NAME,
"next": request.GET['next'] if "next" in request.GET else "/"})
......@@ -18,9 +17,7 @@ class LoginView(FormView):
user = form.login()
if user is not None:
login(request, user)
response = redirect(request.POST["next"] if request.POST["next"] != "" else "/")
return response
return redirect(request.POST["next"] if request.POST["next"] != "" 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