2020-07-13 11:55:28 +00:00
|
|
|
<h1>{{ question.question_text }}</h1>
|
2020-07-20 00:09:01 +00:00
|
|
|
|
|
|
|
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
|
|
|
|
|
|
|
|
<form action="{% url 'polls:vote' question.id %}" method="post">
|
|
|
|
{% csrf_token %}
|
2020-07-13 11:55:28 +00:00
|
|
|
{% for choice in question.choice_set.all %}
|
2020-07-20 00:09:01 +00:00
|
|
|
<input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}">
|
|
|
|
<label for="choice{{ forloop.counter }}">{{ choice.choice_text }}</label><br>
|
2020-07-13 11:55:28 +00:00
|
|
|
{% endfor %}
|
2020-07-20 00:09:01 +00:00
|
|
|
<input type="submit" value="Vote">
|
|
|
|
</form>
|