[Zope] ZClasses meet PythonScripts, sample request

Jim Washington jwashin@vt.edu
Mon, 15 Jan 2001 17:01:39 -0500


Timothy Wilson wrote:
> 
> On Mon, 15 Jan 2001, Jim Washington wrote:
> 
> > Where is the editFormAction Python Script? It should be in your ZClass's
> > /methods.  If you are instead acquiring it from a Folder somewhere, you
> > will need to use 'context' instead of 'container' inside the Python
> > Script.
> 
> I'm not getting any errors now that I've changed the editFormAction to refer
> to 'context'. My guy feeling is that these methods should be methods of the
> ZClass so I'll probably change that, but for now no errors.
> 
> Unfortunately, however, the instance isn't getting updated either. After
> hitting submit I get the red "Your changes have been saved" and the edit
> form is visible, but the same old values are there. When I view the instance
> after updating I also see the same of values. Apparently either REQUEST
> doesn't contain the data it's supposed to or the instance isn't being
> properly modified with REQUEST's contents. Any thoughts?

I would put the Python Script in the ZClass's /methods and see what
happens.

-- Jim