Re: Submitting two tables at once

2009-03-08 Thread AlexK
On Mar 9, 11:36 am, Malcolm Tredinnick wrote: > On Sun, 2009-03-08 at 17:31 -0700, AlexK wrote: > > [...] > > > I've tried implementing your advice, but it gives an error. > > That nice. Would you like us to just guess what the error is? And maybe > guess what the form

Re: Submitting two tables at once

2009-03-08 Thread AlexK
On Mar 9, 11:30 am, Malcolm Tredinnick wrote: > On Sun, 2009-03-08 at 17:15 -0700, AlexK wrote: > > [...] > > > > > To make it a bit easier to view the code, i'll use dpaste: > > Models > >http://dpaste.com/hold/10157/ > > Views > >http://dpaste.com/hold/10159/ > >

Re: Submitting two tables at once

2009-03-08 Thread Malcolm Tredinnick
On Sun, 2009-03-08 at 17:31 -0700, AlexK wrote: [...] > I've tried implementing your advice, but it gives an error. That nice. Would you like us to just guess what the error is? And maybe guess what the form contains at the same time, since it's no doubt involved in the error? > > Here is the

Re: Submitting two tables at once

2009-03-08 Thread AlexK
On Mar 9, 10:32 am, Malcolm Tredinnick wrote: >         def my_view(request, ): >            a_fields = ['data_a'] >            b_fields = ['data_b'] >            if request.method == "POST": >               my_form = MyForm(request.POST) >               if

Re: Submitting two tables at once

2009-03-08 Thread Malcolm Tredinnick
On Sun, 2009-03-08 at 17:15 -0700, AlexK wrote: [...] > > To make it a bit easier to view the code, i'll use dpaste: > Models > http://dpaste.com/hold/10157/ > Views > http://dpaste.com/hold/10159/ > Template > http://dpaste.com/hold/10160/ That template looks very scary. It would be very

Re: Submitting two tables at once

2009-03-08 Thread AlexK
On Mar 9, 10:32 am, Malcolm Tredinnick wrote: > On Sun, 2009-03-08 at 14:24 -0700, AlexK wrote: > > Hello, > > > I'm relatively new to django and i've been trying to figure out this > > difficulty for a while now. I have a set of models that interact like > > so: > > >

Re: Submitting two tables at once

2009-03-08 Thread Malcolm Tredinnick
On Sun, 2009-03-08 at 14:24 -0700, AlexK wrote: > Hello, > > I'm relatively new to django and i've been trying to figure out this > difficulty for a while now. I have a set of models that interact like > so: > > A has many B. > B has many C. > > I need to be able to submit a new A and a new B

Submitting two tables at once

2009-03-08 Thread AlexK
Hello, I'm relatively new to django and i've been trying to figure out this difficulty for a while now. I have a set of models that interact like so: A has many B. B has many C. I need to be able to submit a new A and a new B in a single post. C is referenced by a foreign key. I need to