Skip to content

Commit

Permalink
[1.3.X] Fixed django#16031 -- Corrected comments template examples. T…
Browse files Browse the repository at this point in the history
…hanks, teraom.

Backport from trunk (r16412).

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.3.X@16421 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jezdez committed Jun 16, 2011
1 parent 25ee9b4 commit 7880d99
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
17 changes: 10 additions & 7 deletions docs/ref/contrib/comments/example.txt
Expand Up @@ -103,13 +103,16 @@ 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 }}
<tr>
<td></td>
<td><input type="submit" name="preview" class="submit-post" value="Preview"></td>
</tr>
</form>
<form action="{% comment_form_target %}" method="post">
{% csrf_token %}
{{ form }}
<tr>
<td colspan="2">
<input type="submit" name="submit" value="Post">
<input type="submit" name="preview" value="Preview">
</td>
</tr>
</form>
</table>

Flagging
Expand Down
19 changes: 12 additions & 7 deletions docs/ref/contrib/comments/index.txt
Expand Up @@ -218,13 +218,18 @@ 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 }}
<tr>
<td></td>
<td><input type="submit" name="preview" class="submit-post" value="Preview"></td>
</tr>
</form>
<table>
<form action="{% comment_form_target %}" method="post">
{% csrf_token %}
{{ form }}
<tr>
<td colspan="2">
<input type="submit" name="submit" value="Post">
<input type="submit" name="preview" value="Preview">
</td>
</tr>
</form>
</table>

Be sure to read the `notes on the comment form`_, below, for some special
considerations you'll need to make if you're using this approach.
Expand Down

0 comments on commit 7880d99

Please sign in to comment.