mirror of https://github.com/django/django.git
Fixed #16031 -- Corrected comments template examples. Thanks, teraom.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16412 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c80914d0d1
commit
439cbeaa68
|
@ -103,13 +103,16 @@ But let's look at a simple example::
|
||||||
<!-- A context variable called form is created with the necessary hidden
|
<!-- A context variable called form is created with the necessary hidden
|
||||||
fields, timestamps and security hashes -->
|
fields, timestamps and security hashes -->
|
||||||
<table>
|
<table>
|
||||||
<form action="{% comment_form_target %}" method="post">
|
<form action="{% comment_form_target %}" method="post">
|
||||||
{{ form }}
|
{% csrf_token %}
|
||||||
<tr>
|
{{ form }}
|
||||||
<td></td>
|
<tr>
|
||||||
<td><input type="submit" name="preview" class="submit-post" value="Preview"></td>
|
<td colspan="2">
|
||||||
</tr>
|
<input type="submit" name="submit" value="Post">
|
||||||
</form>
|
<input type="submit" name="preview" value="Preview">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</form>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
Flagging
|
Flagging
|
||||||
|
|
|
@ -218,13 +218,18 @@ you can use in the template::
|
||||||
A complete form might look like::
|
A complete form might look like::
|
||||||
|
|
||||||
{% get_comment_form for event as form %}
|
{% get_comment_form for event as form %}
|
||||||
<form action="{% comment_form_target %}" method="post">
|
<table>
|
||||||
{{ form }}
|
<form action="{% comment_form_target %}" method="post">
|
||||||
<tr>
|
{% csrf_token %}
|
||||||
<td></td>
|
{{ form }}
|
||||||
<td><input type="submit" name="preview" class="submit-post" value="Preview"></td>
|
<tr>
|
||||||
</tr>
|
<td colspan="2">
|
||||||
</form>
|
<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
|
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.
|
considerations you'll need to make if you're using this approach.
|
||||||
|
|
Loading…
Reference in New Issue