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. In
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
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, "
Thanks SmileyChris and ashwoods for the guidance, it definitely
helped...I'm making progress. Once I've gotten to a point where I've
got the form working and validating, I'll post it for comment.
--~--~-~--~~~---~--~~
You received this message because you are sub
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
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
Hello, all. I'm new to Django and Python, and kind of rusty with my
development skills, so please forgive me as I struggle through it all!
I am developing a web site that will eventually have a pretty
significant library of forms in addition to regularly updated content
and other information.
I
7 matches
Mail list logo