[Zope] Noob question on ZClass add script

Jon Fox jonfox at drfox.com
Wed Sep 17 01:36:41 EDT 2003


I was trying to modify the standard add form and the NewZClass_add
python script so that my newly instantiated ZClass would use the
properties in my more verbose add form (standard only has object id).

I have:

# Add a new instance of the ZClass
request = context.REQUEST
instance =
container.LinkFolderClass.createInObjectManager(request['id'], request)

instance.manage_changeProperties(title=request['myFolder_title'])
instance.manage_changeProperties(LinkFolderByline=request['myFolder_Byline'])
instance.manage_changeProperties(LinkFolderText=request['myFolder_Text'])

But this doesn't seem to change the properties of my new ZClass
instance, but instead changes the title property of its container. 

Obviously this is the wrong way. What's the right way?

-- Jon




More information about the Zope mailing list