On 1/23/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I have a model similar to the quickstart tutorial for a survey.  One
> object consists of questions.  I would like to generate a form based on
> the data in this table, for instance, a field object for each row in
> the database.  Is there some way to do this with newforms?  I'm afraid
> I don't have enough Python experience to know if I can make a "dynamic"
> form class like that.

Yes, this is possible -- the easiest way would be to do it in the
Form's __init__(). You can append to the self.fields dictionary.

Judging by what you said about your lack of Python experience, my
advice would be for you to wait until we've got documentation on
building forms dynamically.

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

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

Reply via email to