summaryrefslogtreecommitdiff
path: root/docs/intro/tutorial04.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/intro/tutorial04.txt')
-rw-r--r--docs/intro/tutorial04.txt16
1 files changed, 8 insertions, 8 deletions
diff --git a/docs/intro/tutorial04.txt b/docs/intro/tutorial04.txt
index 414156b56c..4dae8892ae 100644
--- a/docs/intro/tutorial04.txt
+++ b/docs/intro/tutorial04.txt
@@ -20,16 +20,16 @@ tutorial, so that the template contains an HTML ``<form>`` element:
.. code-block:: html+django
:caption: polls/templates/polls/detail.html
- <h1>{{ question.question_text }}</h1>
-
- {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
-
<form action="{% url 'polls:vote' question.id %}" method="post">
{% csrf_token %}
- {% for choice in question.choice_set.all %}
- <input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}">
- <label for="choice{{ forloop.counter }}">{{ choice.choice_text }}</label><br>
- {% endfor %}
+ <fieldset>
+ <legend><h1>{{ question.question_text }}</h1></legend>
+ {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
+ {% for choice in question.choice_set.all %}
+ <input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}">
+ <label for="choice{{ forloop.counter }}">{{ choice.choice_text }}</label><br>
+ {% endfor %}
+ </fieldset>
<input type="submit" value="Vote">
</form>