From 0824b9334463d748c5926ffd27479ebd63415b42 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Tue, 2 Apr 2013 22:34:04 +0100 Subject: [PATCH] Fix django-registration templates with csrf tokens and bootstrap style. --- app/vapemap/templates/registration/login.html | 8 +++++--- .../templates/registration/password_change_form.html | 7 ++++--- .../templates/registration/password_reset_confirm.html | 7 ++++--- .../templates/registration/password_reset_form.html | 9 +++++---- .../templates/registration/registration_form.html | 9 +++++---- 5 files changed, 23 insertions(+), 17 deletions(-) diff --git a/app/vapemap/templates/registration/login.html b/app/vapemap/templates/registration/login.html index 989d81b..e3a6b6d 100644 --- a/app/vapemap/templates/registration/login.html +++ b/app/vapemap/templates/registration/login.html @@ -1,12 +1,14 @@ {% extends "base.html" %} {% load i18n %} +{% load bootstrap %} {% block content %} -
- {{ form.as_p }} + + {{ form|bootstrap }} - + + {% csrf_token %}

{% trans "Forgot password" %}? {% trans "Reset it" %}!

diff --git a/app/vapemap/templates/registration/password_change_form.html b/app/vapemap/templates/registration/password_change_form.html index c27253c..54d52e7 100644 --- a/app/vapemap/templates/registration/password_change_form.html +++ b/app/vapemap/templates/registration/password_change_form.html @@ -1,10 +1,11 @@ {% extends "base.html" %} {% load i18n %} +{% load bootstrap %} {% block content %} -
- {{ form.as_p }} + + {{ form|bootstrap }} - +
{% endblock %} diff --git a/app/vapemap/templates/registration/password_reset_confirm.html b/app/vapemap/templates/registration/password_reset_confirm.html index 9ab7262..e0782aa 100644 --- a/app/vapemap/templates/registration/password_reset_confirm.html +++ b/app/vapemap/templates/registration/password_reset_confirm.html @@ -1,14 +1,15 @@ {% extends "base.html" %} {% load i18n %} +{% load bootstrap %} {% block content %} {% if validlink %}
- {{ form.as_p }} - - + {{ form|bootstrap }} + {% csrf_token %} +
{% else %} diff --git a/app/vapemap/templates/registration/password_reset_form.html b/app/vapemap/templates/registration/password_reset_form.html index c27253c..b46d8b8 100644 --- a/app/vapemap/templates/registration/password_reset_form.html +++ b/app/vapemap/templates/registration/password_reset_form.html @@ -1,10 +1,11 @@ {% extends "base.html" %} {% load i18n %} +{% load bootstrap %} {% block content %} -
- {{ form.as_p }} - - + + {{ form|bootstrap }} + {% csrf_token %} +
{% endblock %} diff --git a/app/vapemap/templates/registration/registration_form.html b/app/vapemap/templates/registration/registration_form.html index c27253c..bf3d6ce 100644 --- a/app/vapemap/templates/registration/registration_form.html +++ b/app/vapemap/templates/registration/registration_form.html @@ -1,10 +1,11 @@ {% extends "base.html" %} {% load i18n %} +{% load bootstrap %} {% block content %} -
- {{ form.as_p }} - - + + {{ form|bootstrap }} + {% csrf_token %} +
{% endblock %}