Fixed #12053 - form examples don't validate according to w3c

Thanks to skyl for the report.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@12086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Luke Plant 2010-01-04 21:55:52 +00:00
parent 77e27e7de7
commit 48edb177ed
8 changed files with 19 additions and 19 deletions

View file

@ -103,7 +103,7 @@ But let's look at a simple example::
<!-- A context variable called form is created with the necessary hidden
fields, timestamps and security hashes -->
<table>
<form action="{% comment_form_target %}" method="POST">
<form action="{% comment_form_target %}" method="post">
{{ form }}
<tr>
<td></td>

View file

@ -218,7 +218,7 @@ you can use in the template::
A complete form might look like::
{% get_comment_form for event as form %}
<form action="{% comment_form_target %}" method="POST">
<form action="{% comment_form_target %}" method="post">
{{ form }}
<tr>
<td></td>
@ -239,7 +239,7 @@ You may have noticed that the above example uses another template tag --
form. This will always return the correct URL that comments should be posted to;
you'll always want to use it like above::
<form action="{% comment_form_target %}" method="POST">
<form action="{% comment_form_target %}" method="post">
Redirecting after the comment post
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -49,7 +49,7 @@ To enable CSRF protection for your views, follow these steps:
2. In any template that uses a POST form, use the :ttag:`csrf_token` tag inside
the ``<form>`` element if the form is for an internal URL, e.g.::
<form action="" method="POST">{% csrf_token %}
<form action="" method="post">{% csrf_token %}
This should not be done for POST forms that target external URLs, since
that would cause the CSRF token to be leaked, leading to a vulnerability.