From e7dd1aa01a6d8d416d4ab3173206e481c1049e53 Mon Sep 17 00:00:00 2001 From: Robert Einsle Date: Sun, 11 Feb 2018 08:12:08 +0100 Subject: [PATCH] move login formular to crispy --- templates/includes/form.html | 26 -------------------------- templates/registration/login.html | 4 +++- 2 files changed, 3 insertions(+), 27 deletions(-) delete mode 100644 templates/includes/form.html diff --git a/templates/includes/form.html b/templates/includes/form.html deleted file mode 100644 index d4aa8a9..0000000 --- a/templates/includes/form.html +++ /dev/null @@ -1,26 +0,0 @@ -{% load form_tags widget_tweaks %} - -{% if form.non_field_errors %} - -{% endif %} - -{% for field in form %} -
- {{ field.label_tag }} - {% render_field field class=field|input_class %} - {% for error in field.errors %} -
- {{ error }} -
- {% endfor %} - {% if field.help_text %} - - {{ field.help_text|safe }} - - {% endif %} -
-{% endfor %} diff --git a/templates/registration/login.html b/templates/registration/login.html index 16d4d77..79ae741 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -1,5 +1,7 @@ {% extends '_base_accounts.html' %} +{% load crispy_forms_tags %} + {% block title %}login{% endblock %} {% block content %} @@ -11,7 +13,7 @@
{% csrf_token %} - {% include 'includes/form.html' %} + {{ form|crispy }}