Skip to content

Commit

Permalink
Use django 1.2 CSRF protection
Browse files Browse the repository at this point in the history
Signed-off-by: Jannis Leidel <jannis@leidel.info>
  • Loading branch information
diox authored and jezdez committed May 5, 2010
1 parent 32b6155 commit 768359b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion avatar/templates/avatar/add.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
4 changes: 2 additions & 2 deletions avatar/templates/avatar/change.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
2 changes: 1 addition & 1 deletion avatar/templates/avatar/confirm_delete.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

0 comments on commit 768359b

Please sign in to comment.