From b6cfdcd9310d0b44648fd0c3eedc76426d7b6786 Mon Sep 17 00:00:00 2001 From: Charlie Jacomme Date: Sat, 11 Aug 2018 04:15:46 +0200 Subject: [PATCH] portail login prettier --- re2o/templates/re2o/portail_login.html | 9 ++++++++- re2o/views.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/re2o/templates/re2o/portail_login.html b/re2o/templates/re2o/portail_login.html index 579b66bc..80f12c96 100644 --- a/re2o/templates/re2o/portail_login.html +++ b/re2o/templates/re2o/portail_login.html @@ -28,12 +28,19 @@ with this program; if not, write to the Free Software Foundation, Inc., {% block title %}Machine non reconnue{% endblock %} {% block content %} + + +
+

Création d'une machine fillaire

+

Pour créer une machine fillaire, connectez vous puis débranchez et rebranchez votre cable Ethernet

+
+ {% bootstrap_form_errors loginform %}
{% csrf_token %} {% bootstrap_form loginform %} - {% bootstrap_button action_name button_type="submit" icon="star" %} +
diff --git a/re2o/views.py b/re2o/views.py index 5564766f..3de4d001 100644 --- a/re2o/views.py +++ b/re2o/views.py @@ -102,7 +102,7 @@ def mac_from_ip(ip): def portail_login(request): """ 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 if login_form.is_valid(): remote_ip = get_ip(request)