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 to each model instance so a view would look something like this: import from somewhere NewModel, OtherModel import the form stuff :) def form(request): if request.method == 'POST': p = NewModel() q = OtherModel() p.title = request.POST['title'] # i guess this hasnt changed. q.address = request.POST['address'] q.save() p.save() else: do the form stuff newforms is very new and not fully documented, so there might be some shortcuts ( like the _forms.models.form_for_model_) that maybe allow you to "bind" one form to more than 1 model. but i dont know. but i think this should work On Jan 22, 8:07 pm, "JimR" <[EMAIL PROTECTED]> wrote: > 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 am using newforms and I would like to update several models from one > html template. It's a registration app that has separate models for > user ID/password, Name/personal information, address, and contact > information, all tied together through a unique User ID. I'd like to > display all of the fields on one registration page then update the > appropriate models with the information returned. I've tried multiple > forms representing each model, and one form with fields from all > models, but can't seem to get either to work: > > 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 the > various models? If so, how do I assign the appropriate fields to their > respective models? > > In either case, I could use a little guidance in constructing the view. > > Again, I apologize of this is basic stuff, but any help you can provide > will be greatly appreciated! > > Thanks, > Jim --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---