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_
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
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
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
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
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
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
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
8 matches
Mail list logo