Commit 33f79fca authored by Mathieu Rodic's avatar Mathieu Rodic

[FEAT] re-implemented authentication

parent b35e1b64
......@@ -28,11 +28,11 @@ def login(request):
# /!\ pass is sent clear in POST data
password = request.POST['password']
user = authenticate(username=username, password=password)
user = auth.authenticate(username=username, password=password)
if user is not None:
if user.is_active:
login(request, user)
auth.login(request, user)
# if "next" forwarded from the GET via the template form
if ('the_next_page' in request.POST):
......
......@@ -37,7 +37,7 @@
<div id="grp-content-container">
<div class="g-d-c g-d-10 g-centered">
<form action="/auth/" method="post"><input type='hidden' name='csrfmiddlewaretoken' value='Yopwc8YatA3C68kSevZX9upoXdIcZzPn' />
<form action="" method="post"><input type='hidden' name='csrfmiddlewaretoken' value='Yopwc8YatA3C68kSevZX9upoXdIcZzPn' />
<fieldset class="grp-module grp-module-login">
<h2>
<span class="grp-current-page">Login</span>
......@@ -48,7 +48,6 @@
{% block main %}
<div id="login">
<form class="form-horizontal" name="LoginForm" action="/auth/" method="post">
{% csrf_token %}
{% if next_page %}
<input type="hidden" name="the_next_page" value="{{ next_page }}" />
......
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