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 with this form field definition in my form:

    polls = forms.ChoiceField(required=True, widget=forms.Select,
choices=polls)

It seems to be having a problem with my specified "choices" valule. In
my view I plan on creating a list object from the database table which
will contain the choices to be displayed in my select (dropdown) box.
but the documentation doesn't seem to explicitly explain with a coding
example how to specify a database table column for the choices
parameter.

On Jan 5, 3:59 pm, Shawn Milochik <sh...@milochik.com> wrote:
> 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 
> probably help you fix your code.
>
> http://docs.djangoproject.com/en/1.2/intro/tutorial01/
>
> Once you've done that, you're going to want to make a ModelForm instead of a 
> Form, and then create one for each instance of your Poll class and put them 
> into a list, or use model formsets. You can read about all that stuff in the 
> link below, but I think it will be overwhelming until you've gone through the 
> tutorial.
>
> http://docs.djangoproject.com/en/1.2/topics/forms/modelforms/
>
> Shawn

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to