Re: Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
It worked, first time :-) For the record, this is what the code looks like now: urls.py: (r'address/edit/(?P\d+)/', 'testdb.mtable.views.edit_address') views.py: def edit_address(request, id=None): address = Address.objects.get(pk=id) country = address.country AddressForm = form_

Re: Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Thanks -- I'll try those ideas as well. On Oct 4, 4:05 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On 10/4/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > > > It's using the save() method from AddressForm, which only knows about > > its own fields. > > You should also verify that is_valid() is

Re: Updating multiple records from one HTML form

2007-10-04 Thread Marty Alchin
On 10/4/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > It's using the save() method from AddressForm, which only knows about > its own fields. You should also verify that is_valid() is in fact checking all the fields as well. I suspect that, like save(), it's only looking at the AddressForm fields

Re: Updating multiple records from one HTML form

2007-10-04 Thread Marty Alchin
On 10/4/07, James Mulholland <[EMAIL PROTECTED]> wrote: > The form is rendered OK, and any changes to the 'Address' record are > saved. Changes to the 'Country' record aren't, however, and I wondered > if there's a way to do this. Any help much appreciated :) It's using the save() method from Add

Re: Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Thanks for the help :) Seems like a very sound approach, not least because I understand it! -- James On Oct 4, 3:53 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2007-10-04 at 07:37 -0700, James Mulholland wrote: > > Hi, > > > [Note: apologies for the double post. Google didn't off

Re: Updating multiple records from one HTML form

2007-10-04 Thread Malcolm Tredinnick
On Thu, 2007-10-04 at 07:37 -0700, James Mulholland wrote: > Hi, > > [Note: apologies for the double post. Google didn't offer to preview > the message, which is what I was trying to do...] > > I'm starting to investigate newforms in detail (having previously used > the old forms library) since

Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Hi, [Note: apologies for the double post. Google didn't offer to preview the message, which is what I was trying to do...] I'm starting to investigate newforms in detail (having previously used the old forms library) since I have a job to convert an Access DB to web format. The client wants to m

Updating multiple records from one HTML form

2007-10-04 Thread James Mulholland
Hi, I'm starting to investigate newforms in detail (having previously used the old forms library) since I have a job to convert an Access DB to web format. The client wants to maintain a similar layout to what they have in Access, which in places means having one page which has several records on