mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 19:33:11 +00:00
portail login prettier
This commit is contained in:
parent
833a3f5348
commit
b6cfdcd931
2 changed files with 9 additions and 2 deletions
|
@ -28,12 +28,19 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
{% block title %}Machine non reconnue{% endblock %}
|
{% block title %}Machine non reconnue{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
||||||
|
<div class="alert alert-success">
|
||||||
|
<h4 class="alert-heading">Création d'une machine fillaire</h4>
|
||||||
|
<p>Pour créer une machine fillaire, connectez vous puis débranchez et rebranchez votre cable Ethernet</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% bootstrap_form_errors loginform %}
|
{% bootstrap_form_errors loginform %}
|
||||||
|
|
||||||
<form class="form" method="post">
|
<form class="form" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{% bootstrap_form loginform %}
|
{% bootstrap_form loginform %}
|
||||||
{% bootstrap_button action_name button_type="submit" icon="star" %}
|
<button type="submit" class="btn btn-success">Login</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ def mac_from_ip(ip):
|
||||||
|
|
||||||
def portail_login(request):
|
def portail_login(request):
|
||||||
""" Check for authentication. If success, register the current machine for the user."""
|
""" Check for authentication. If success, register the current machine for the user."""
|
||||||
login_form = AuthenticationForm(data=request.POST)
|
login_form = AuthenticationForm(data=request.POST or None)
|
||||||
success = False
|
success = False
|
||||||
if login_form.is_valid():
|
if login_form.is_valid():
|
||||||
remote_ip = get_ip(request)
|
remote_ip = get_ip(request)
|
||||||
|
|
Loading…
Reference in a new issue