Re: Displaying DB Values in a Dropdown Box

2011-01-05 Thread Shawn Milochik
A "choices" value should be a tuple or list containing two-value tuple or list containing the key and value for each dropdown option. Other issues with the code you originally posted: 1. What looked like a context (that dictionary containing "polls"), was being passed to the creation of a

Re: Displaying DB Values in a Dropdown Box

2011-01-05 Thread hank23
Actually I have been through the tutorial, but there are still a lot of gaps in the information presented, because many of the examples may or may not show all of the code in all of the various modules which is needed for everything to work together successfully. My next question is what is wrong

Re: Displaying DB Values in a Dropdown Box

2011-01-05 Thread Shawn Milochik
You're not seeing anything for several reasons. There are just a lot of fundamental things about the way Django works that it seems you haven't gotten to yet in your learning. For now, I recommend you follow the tutorial -- do everything step by step so you can see how it works. That alone will

Displaying DB Values in a Dropdown Box

2011-01-05 Thread hank23
I'm trying to display DB data in a dropdon box on a screen using a form. Here's my form/formfield code: from django import forms class AddChoiceForm(forms.Form): ccount = forms.IntegerField() pquestion = forms.CharField() message = forms.CharField() polls =