{% extends "base.html" %}

{% set title = question.question_text %}

{% block content %}
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}

<form action="{{ url('vote', question_id=question.id) }}" method="post">
{% for choice in choices %}
    <input type="radio" name="choice" id="choice{{ loop.index }}" value="{{ choice.id }}" />
    <label for="choice{{ loop.index }}">{{ choice.choice_text }}</label><br />
{% endfor %}
<input type="submit" value="Vote" />
</form>
{% endblock %}
