[Zope] Adding zclass inside folder with python

Anthu Nguyen Anthu.Nguyen at Sun.COM
Tue May 17 17:34:09 EDT 2005


Hi,

I've tried everything I can think of and am probably missing something
obvious - help...

I'm trying to (1) Create a folder, then (2) Add a new zclass inside that
folder.
Instead, the zclass is being added in the same space as the folder:

- What I want:

New Folder
    New ZClass

- What's happening:

New Folder
New ZClass

===========
The code that doesn't work:

request = context.REQUEST
pbuildid = request.pbuildid

# Add a new folder with id=pbuildid
context.manage_addFolder(id=pbuildid)

# Add a new instance of the ZClass inside new folder
instance = context.pbuild.createInObjectManager(request['id'], request)
instance.propertysheets.pbuild_properties.manage_editProperties(request)

===========
TIA, AnThu Nguyen



More information about the Zope mailing list