[snowy] Add {% csrf_token %} tags to support logins with django 1.3



commit a166b2f346cd0faf11b3bbbe37ef8ba1d9ba3fe7
Author: Jeff Schroeder <jeffschroeder computer org>
Date:   Thu Oct 6 21:09:06 2011 -0700

    Add {% csrf_token %} tags to support logins with django 1.3

 accounts/templates/accounts/login.html             |    2 +-
 accounts/templates/registration/login.html         |    1 +
 .../templates/registration/registration_form.html  |    1 +
 3 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/accounts/templates/accounts/login.html b/accounts/templates/accounts/login.html
index 4b85253..80a341e 100644
--- a/accounts/templates/accounts/login.html
+++ b/accounts/templates/accounts/login.html
@@ -33,7 +33,7 @@
         {% endif %}
     </h2>
     {% if not user.is_authenticated %}
-    <form method="post" id="auth-login-form" action="{% url auth_login %}">
+    <form method="post" id="auth-login-form" action="{% url auth_login %}">{% csrf_token %}
         <b>{{ auth_form.username.label_tag }}</b>
         {{ auth_form.username }}
         <br />
diff --git a/accounts/templates/registration/login.html b/accounts/templates/registration/login.html
index 33a5fbc..83a35e5 100644
--- a/accounts/templates/registration/login.html
+++ b/accounts/templates/registration/login.html
@@ -9,6 +9,7 @@
 <h3>{% trans "Log in" %}</h3>
 
 <form method="post" action=".">
+{% csrf_token %}
 <table>
 <tr>
     <td>{{ form.username.label_tag }}</td>
diff --git a/accounts/templates/registration/registration_form.html b/accounts/templates/registration/registration_form.html
index 9cbdac5..3a863bf 100644
--- a/accounts/templates/registration/registration_form.html
+++ b/accounts/templates/registration/registration_form.html
@@ -12,6 +12,7 @@
 <h1>Tell {{ site.name }} about yourself!</h1>
 
 <form method="POST">
+    {% csrf_token %}
     <p>
       <label for="username" class="registration-form-label">{{ form.username.label }}:</label>
       {{ form.username }}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]