</div>
<div id="main-body" class="ask-body">
<div id="askform">
- <form id="fmedit" action="{% url edit_answer answer.id %}" method="post" >
+ <form id="fmedit" action="{% url edit_answer answer.id %}" method="post">
+ {% csrf_token %}
<label for="id_revision" ><strong>{% trans "revision" %}:</strong></label> <br/>
{% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul }}{% endif %}
<div>
<div id="main-body" class="ask-body">
<div id="askform">
<form id="fmask" action="" method="post" accept-charset="utf-8">
+ {% csrf_token %}
{% if not request.user.is_authenticated %}
<div class="message">
<span class="strong big">{% trans "You are welcome to start submitting your question anonymously." %}</span>
{% endif %}
<div class="aligned">
<form action="" method="post" accept-charset="utf-8">
+ {% csrf_token %}
<ul id="changepw-form" class="form-horizontal-rows">
{{form.as_ul}}
</ul>
<div class="login">
<form name="fregister" action="" method="POST">
+ {% csrf_token %}
{{ form1.next }}
<div class="form-row-vertical margin-bottom">
<label for="id_username">{{ form1.username.label }}</label>
{% if form2 %}
<div class="login" style="display:none">
<form name="fverify" action="{% url user_register %}" method="POST">
+ {% csrf_token %}
{{ form2.next }}
<fieldset style="padding:10px">
<legend class="big">{% trans "Existing account" %}</legend>
{% endif %}\r
{% for provider in top_stackitem_providers %}\r
<form class="signin_form" method="POST" action="{% url auth_provider_signin provider=provider.id %}" accept-charset="utf-8">\r
+ {% csrf_token %}\r
{% include provider.stack_item_template %}\r
<input type="hidden" class="validate_email" name="validate_email" value="yes" />\r
</form>\r
{% endfor %}\r
</div>\r
<form name="signin_form" id="signin_form" class="signin_form" method="POST" action="">\r
+ {% csrf_token %}\r
<div id="signin_form_slot"></div>\r
<input type="hidden" class="validate_email" name="validate_email" value="yes" />\r
</form>\r
{% for provider in stackitem_providers %}\r
<h3 class="or_label">{% trans 'Or...' %}</h3>\r
<form class="signin_form" method="POST" action="{% url auth_provider_signin provider=provider.id %}" accept-charset="utf-8">\r
+ {% csrf_token %}\r
{% include provider.stack_item_template %}\r
<input type="hidden" class="validate_email" name="validate_email" value="yes" />\r
</form>\r
{% endfor %}\r
<h3 class="or_label">{% trans 'Or...' %}</h3>\r
<form name="signin_form" id="dummy_form_unused" class="signin_form" method="POST" action="">\r
+ {% csrf_token %}\r
<fieldset>\r
{% trans 'Click' %} <a href="{% url auth_request_tempsignin %}">{% trans 'here' %}</a> {% trans "if you're having trouble signing in." %}\r
</fieldset>\r
</ul>\r
{% endif %}\r
<form action="" method="post" accept-charset="utf-8">\r
+ {% csrf_token %}\r
<ul id="changepw-form" class="form-horizontal-rows">\r
{{form.as_ul}}\r
</ul>\r
</p>
<form id="fmclose" action="{% url close question.id %}" method="post" >
+ {% csrf_token %}
<p>
<strong>{% trans "Reasons" %}:</strong> {{ form.reason }}
</p>
</div>
<div class="content">
<form method="post" action="{% url feedback %}" accept-charset="utf-8">
+ {% csrf_token %}
{% if user.is_authenticated %}
<p class="message">
{% blocktrans with user.username as user_name %}
<div id="searchBar">
<form action="{% url search %}" method="get">
+ {% csrf_token %}
<div>
<input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" />
<input type="submit" name="Submit" value="{% trans "search" %}" class="searchBtn" />
<div id="comment-{{ post.id }}-form-container" class="comment-form-container">\r
{% if can_comment %}\r
<form id="comment-{{ post.id }}-form" method="post" action="{% url comment id=post.id %}" accept-charset="utf-8">\r
+ {% csrf_token %}\r
<div class="comment-form-widgets-container">\r
<textarea name="comment" class="commentBox"></textarea>\r
<div class="comment-form-buttons">\r
{% block content %}
{% comment %} this form is set up to be used in wizards {% endcomment %}
<form name="notarobot" action="." method="POST">
+ {% csrf_token %}
<div>
{{form}}
</div>
{% block admincontent %}
<form action="" method="POST">
+ {% csrf_token %}
<table>
{{ form.as_table }}
<tr><th></th><td><input type="submit" value="{% trans "Save" %}"></td></tr>
{% block admincontent %}
<form action="" method="post" accept-charset="utf-8">
+ {% csrf_token %}
<table style="width: 100%">
{{ form.as_table }}
<tr>
{% block admincontent %}
<form method="POST" action="">
+ {% csrf_token %}
{% if in_maintenance %}
<h1>{% trans "Your site is currently running on maintenance mode." %}</h1>
<p>{% trans "You can adjust the settings bellow" %}</p>
{% block admincontent %}
<div class="module">
<form action="" id="changelist" method="POST">
+ {% csrf_token %}
<div class="actions">
{% trans "Verify:" %}
<input type="text" size="3" name="limit" id="filter-limit" value="5" />
<div id="changelist" class="module filtered">
<div id="toolbar">
<form method="get" action="" id="changelist-search">
+ {% csrf_token %}
<div>
<div>
<label><img alt="Search" src="{{ settings.ADMIN_MEDIA_PREFIX }}img/admin/icon_searchbox.png"></label>
{% endfor %}
</ul>
<form action="" method="POST">
+ {% csrf_token %}
<input name="filter_name" type="text" size="20" id="filter-name-box" style="color: #AAA;" value="{% trans "Filter name..." %}" />
<button name="save_filter" value="0" style="color: #AAA;" title="{% trans "Click to save the current filter" %}" id="save-filter-button" disabled="disabled" class="button">{% trans "Save" %}</button>
</form>
{% comment %}<h3>{% trans "Show" %}</h3>
<form action="" method="get">
+ {% csrf_token %}
<div>{{ show_form.show }}</div>
<input type="submit" value="{% trans "Refresh" %}" />
</form>{% endcomment %}
</div>
</div>
<form id="changelist-form" method="POST" action="">
+ {% csrf_token %}
<div class="actions">
<label>
{% trans "Action" %}:
\r
{% block admincontent %}\r
<form action="" method="POST" enctype="multipart/form-data" accept-charset="utf-8">\r
+ {% csrf_token %}\r
<table id="admin_form" style="width: 100%">\r
{{ form.as_table }}\r
<tr>\r
</div>\r
{% endif %}\r
<form id="fmanswer" action="{% url answer question.id %}" method="post">\r
+ {% csrf_token %}\r
<div style="clear:both">\r
</div>\r
\r
</div>
<div id="main-body" class="ask-body">
<div id="askform">
- <form id="fmedit" action="" method="post" >
+ <form id="fmedit" action="" method="post">
+ {% csrf_token %}
<label for="id_revision" ><strong>{% trans "revision" %}:</strong></label> <br/>
{% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul }}{% endif %}
<div style="vertical-align:middle">
</div>
<div id="main-body" class="ask-body">
<div id="askform">
- <form id="fmretag" action="{% url edit_question question.id %}" method="post" >
+ <form id="fmretag" action="{% url edit_question question.id %}" method="post">
+ {% csrf_token %}
<h3>
{{ question.headline }}
</h3>
</strong>
</p>
- <form id="fmclose" action="{% url reopen question.id %}" method="post" >
-
+ <form id="fmclose" action="{% url reopen question.id %}" method="post">
+ {% csrf_token %}
<div id="" style="padding:20px 0 20px 0">
<input type="submit" value="{% trans "Reopen this question" %}" class="submit" />
<input id="btBack" type="button" value="{% trans "Cancel" %}" class="submit" />
-
</div>
-
</form>
</div>
{% endblock %}
</div>
<div id="main-body" style="text-align: center; height: 400px;">
<form action="{% url search %}" method="get">
+ {% csrf_token %}
<div>
<input type="text" class="searchInput" value="{{ keywords }}" name="q" id="keywords" style="width: 600px" />
<input type="submit" name="Submit" value="{% trans "search" %}" class="searchBtn" />
</div>\r
<div id="main-body" style="width:100%;padding-top:10px">\r
<form name="" action="{% url edit_user user.id %}" method="post">\r
+ {% csrf_token %}\r
<div id="left" style="float:left;width:180px">\r
{% if user.email %}\r
{% gravatar user 128 %}\r
<h2>{% trans "Preferences" %}</h2>
<div class='inline-block'>
<form method="POST">
+ {% csrf_token %}
<p class="message">
{% trans "Here you can set some personal preferences." %}
</p>
</p>\r
<div class='inline-block'>\r
<form method="POST">\r
+ {% csrf_token %}\r
{{ form.errors }}\r
<table class="form-as-table">\r
<tr>\r
{% if captcha_form.recaptcha %}
<form action="." method="post">
+{% csrf_token %}
<table>
<tr>
<td>
<strong>{% trans "Start new backup" %}</strong>
</p>
<form method="POST" action="">
+ {% csrf_token %}
<table>
{{ form.as_table }}
</table>
\r
{% block admincontent %}\r
<form method="post" action="" enctype="multipart/form-data">\r
+ {% csrf_token %}\r
<input type="file" name="dump" /><br>\r
{% trans "Your user id in stack exchange" %}\r
<input type="test" name="owneruid" size="3" value="2" /><br />\r
]
MIDDLEWARE_CLASSES = [
+ 'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'forum.middleware.extended_user.ExtendedUser',