Hello! I am having a problem with one of the examples in Chapter 12 of the Zope book. I am creating a new product called "Zoo Exhibit" comprising of a DTML method, a Python script and, of course, a factory. http://www.zope.org/Members/michel/ZB/CustomZopeObjects.html < just under Fig 12.2 details the example. I have a DTML method sending "id" and "title" to a Python method/script. I am told to create a "Python Script". I assume this is done by creating a "Python Method"? This is the script I am told to create: def add(self, container, id, title, REQUEST=None): """ Copy the exhibit template to the calling folder. """ exhibit=self.manage_clone(container.exhibitTemplate, id) exhibit.manage_changeProperties(title=title) if REQUEST is not None: return self.manage_main(self, REQUEST) Should this be the entire body of the method or do the parameters need to be listed AGAIN in the "parameter list"? When I add my new Zoo Exhibit product it calls the DTML method and I can insert the data as required but when submitted it does not do ANYTHING. What I am asking is: Exactly what is added to the parameter list, method body & title of the newly created Python method? Thanks in advance! _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com
From: Lothar T.E.L. <thatlothar@hotmail.com>
I am having a problem with one of the examples in Chapter 12 of the Zope book. I am creating a new product called "Zoo Exhibit" comprising of a DTML method, a Python script and, of course, a factory.
The Zope book examples are based on Zope 2.3, which includes classes (such as Python Scripts) and behaviors that do not exist in prior versions. Zope 2.3 is currently in alpha testing, and is available through CVS.
I have a DTML method sending "id" and "title" to a Python method/script. I am told to create a "Python Script". I assume this is done by creating a "Python Method"?
Python Scripts supersede Python Methods, and behave somewhat differently. Cheers, Evan @ digicool & 4-am
participants (2)
-
Evan Simpson -
Lothar T.E.L.