Re: Multiple Forms and/or Models from one template (newforms)

2007-03-19 Thread dballanc
I don't know if it would be of any use to you, but when faced with this problem I ended up making subclass of forms.Form that handled one to one relations. It works a little like form_for_model/instance in that it generates the form based on the model definition rather than fields you define.

Re: Multiple Forms and/or Models from one template (newforms)

2007-03-19 Thread JimR
Brooks, Just saw your note and, no, I haven't gotten it to work the way I wanted. I'm having the same problem and just made another post on the subject. I've tried a bunch of different things, to no avail. I'll keep hacking away at it until it works and if I come up with something I'll drop you

Re: Multiple Forms and/or Models from one template (newforms)

2007-02-19 Thread brooks
Have you had any luck so far, Jim? I'm in a similar boat, and haven't been able to get it to work. My problem seems to be adding the 'id' to the clean_data and getting it to validate. Anything you've managed to figure out would be very helpful. At this point, I'm stuck. On Jan 24, 11:33 am,

Re: Multiple Forms and/or Models from one template (newforms)

2007-01-22 Thread SmileyChris
On Jan 23, 8:07 am, "JimR" <[EMAIL PROTECTED]> wrote: > 1. Can/Should I use multiple forms on one template that will update the > models? So far, when I've tried this approach the "post" only uses the > first form on the page. > > 2. Should I use one large form containing all of the fields from

Re: Multiple Forms and/or Models from one template (newforms)

2007-01-22 Thread ashwoods
i would do case 2. you can create a NewForm object with all the fields you want. then in the view where you process the post request, you just create (or edit) the model instances manually. that means you import all your models, you create a new instance of each model and assign the request data