[Zope] Getting data from object inside ZClass

Davis Marques davis at mccalldesign.com
Fri Aug 22 18:45:12 EDT 2003


I'm developing a product using ZClasses, and I'm having some problems. 
When I make an instance of my ZClass, I want to copy a number of
DTMLDocuments that are contained inside the ZClass to the inside of the
new ZClass instance.  Here's what I've got:


# add a new instance of the ZClass, initialize properties
instance = container.DPPortal.createInObjectManager(request['id'], request)
instance.propertysheets.Basic.manage_editProperties(request)

# the ZClass
producthome = getattr(container,'DPPortal')

# make a new DTMLDocument with data from default_css
source = getattr(producthome,'default_css')
instance.manage_addDTMLMethod(id='designportal.css',title='Default Design
Portal stylesheet',file=source.data)




More information about the Zope mailing list