It will be a bit generic help: To understand what's going wrong with your 
code when you expect other type of behavior you can use debugging tools 
like: pdb or (if you use an IDE like pycharm) build-in IDE debugger 
(https://www.jetbrains.com/help/pycharm/debugging-django-templates.html, 
https://www.jetbrains.com/help/pycharm/debugging-django-templates.html).

I believe you'll get to the root cause of the problem faster with debugger 
use.

On Monday, May 14, 2018 at 4:02:43 AM UTC-7, Yufenyuy Veyeh Didier 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/5ba932a2-31b9-4adc-aa03-34015967e754%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to