Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2017-02-09 Thread Brady Lee
The "polls_choice" table in database file db.sqlite3 has no records, so no radio buttons show up. I manually added 2 records to the "polls_choice" table, then I have the radio buttons showed up. On Tuesday, February 7, 2017 at 6:17:58 PM UTC+8, ludovic coues wrote: > > Have you added some choi

Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2017-02-07 Thread ludovic coues
Have you added some choices to the "What's up?" question ? What you see is that question.choice_set.all is empty. The following snippet will give you some output: {% for choice in question.choice_set.all %} {{ choice.choice_text }} {% empty %} Sorry, no available choices. {% endfor %

Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2017-02-07 Thread Brady Lee
Same issue here, no radio buttons show up. ubuntu 16.04.1 LTS python 3.5.2 django 1.10.5 I've tried {{ question|pprint }} and {{ question.choice_set.all|pprint }} for debugging, got: Now trying to figure out where the problem is. On Thursday, October 20, 2016 at 11:52:59 PM UTC+8, Othniel

Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2016-10-22 Thread ludovic coues
I would try to add that right before the loop: {{ question|pprint }} {{ question.choice_set.all|pprint }} The result should be something like that the pprint filter is for debugging, you should remove once your issue is fixed. It will make obvious some error like question.choi

Re: Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2016-10-21 Thread Othniel Ayinzat
I think the problem is from around: {% for choice in question.choice_set.all %} {{ choice.choice_text }} {% endfor %} This is because i tested outside the loop and i got the radio button, but the whole idea was to loop through the questions and assign a button for the choices. -- You rece

Tutorial part 4 help: the raidio buttons to make a choice on the polls question won't show.

2016-10-20 Thread Othniel Ayinzat
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. Be