> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Alan Gauld
> Sent: Tuesday, October 31, 2006 4:47 PM
> To: tutor@python.org
> Subject: Re: [Tutor] Mapping to object attributes
>
>
> "Mike Hansen" <[EMAIL
"Mike Hansen" <[EMAIL PROTECTED]> wrote
> I've got a web form with a lot of form fields. I'd like to be able
> to map
> the form fields to an object's attributes. I'm having a little
> trouble
> figuring out how.
John has answered that bit.
> There will be some fields I'll need to validate(bo
On 01/11/06, Mike Hansen <[EMAIL PROTECTED]> wrote:
> form = cgi.FieldStorage()
> widget = Widget()
>
> form_field_object_map = {'widget_name' : widget.name,
> 'alt_widget_name' : widget.alt_name,
> ...}
>
> for form_field in form_field_obje