Hi guys,
 I have been following the django tutorials up to part 4 on the polls 
application. My details template only displays the vote submit button but 
the radio buttons for making choices won't show. I have been battling with 
this for some hours now and i need help or some pointers. Thanks. Below are 
the code snippets for the polls app.

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 %}
<input type="submit" value="Vote" />
</form>

polls/templates/polls/index.html
-----------------------------------------------

{% if latest_question_list %}
<ul>
{% for question in latest_question_list %}
<li><a href="{% url 'polls:detail' question.id %}">{{ 
question.question_text }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/62660f2a-1f05-4eb6-85cf-bc27b96de8f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to