Use django 1.2 CSRF protection

Signed-off-by: Jannis Leidel <jannis@leidel.info>
This commit is contained in:
Mathieu Pillard 2010-03-25 18:42:00 +01:00 committed by Jannis Leidel
parent 32b61553d2
commit 768359b11d
3 changed files with 4 additions and 4 deletions

View file

@ -9,6 +9,6 @@
{% endif %}
<form enctype="multipart/form-data" method="POST" action="{% url avatar_add %}">
{{ upload_avatar_form.as_p }}
<p><input type="submit" value="{% trans "Upload New Image" %}" /></p>
<p>{% csrf_token %}<input type="submit" value="{% trans "Upload New Image" %}" /></p>
</form>
{% endblock %}

View file

@ -11,11 +11,11 @@
<ul>
{{ primary_avatar_form.as_ul }}
</ul>
<input type="submit" value="{% trans "Choose new Default" %}" />
<p>{% csrf_token %}<input type="submit" value="{% trans "Choose new Default" %}" /></p>
</form>
{% endif %}
<form enctype="multipart/form-data" method="POST" action="{% url avatar_add %}">
{{ upload_avatar_form.as_p }}
<p><input type="submit" value="{% trans "Upload New Image" %}" /></p>
<p>{% csrf_token %}<input type="submit" value="{% trans "Upload New Image" %}" /></p>
</form>
{% endblock %}

View file

@ -11,7 +11,7 @@
<ul>
{{ delete_avatar_form.as_ul }}
</ul>
<input type="submit" value="{% trans "Delete These" %}" />
<p>{% csrf_token %}<input type="submit" value="{% trans "Delete These" %}" /></p>
</form>
{% endif %}
{% endblock %}