Your template looks fine, and as the question_text is displayed correctly, it probably safe to assume that your view is correct too.
Two things you can check: - does this question actually have any related choices? You can check in the admin. - check your models.py if you actually named the model "Choice". If you named it something else e.g. "Answer", the field on the Question model would be called "answer_set" instead of "choice_set" Hope that helps, Daniel On Mon, May 14, 2018 at 1:00 PM, Yufenyuy Veyeh Didier <yve...@gmail.com> wrote: > Hi everyone, I'm new to python and Django. I also think I am getting it > well. But I have an issue with the first Django app tutorial. > My questions display well redirect to the detail view well and to the vote > view well. > The problem I have is that my question does not display the 'choices' of > type radio bellow the question text but displays the vote button of type > submit > below is the code for the detail.html template and the image of the view > on my browser. > > Can anyone help, please? > > <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> > > > > > <https://lh3.googleusercontent.com/-KAQZAmu0A44/Wvlr4qLsQ-I/AAAAAAAADAg/1bcawxvN31Eih1bTo39WgNu7brs7HzpdgCLcBGAs/s1600/details%2Bview.png> > > > -- > 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/7f230a60-7c1e-4ae6-8152-9725e9cb01f9%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/7f230a60-7c1e-4ae6-8152-9725e9cb01f9%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAHEnUVXPSrATU5LgaPv9eZqwc97vCURfB2fPtw_H1wDArs8wew%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.