[Zope] adding files and folder in a object during generation

Allen Huang swapp0 at yahoo.com
Thu Mar 15 01:18:06 EDT 2007


I created an external product using python to creates a folderish object. During object instantiation by 
            manage_addProduct(self, id, ......): 
I wish to add a couple of empty files and folder. 
 
I tried 
            self.manage_addFolder('folderID', , 'folderName') 
but it just create a folder outside of the object.
I tried
            id.manage_addFolder('folderID', , 'folderName') 
but id is a str and does not have manage_addFolder
I tried 
            self.getitem(id).manage_addFolder('folderID', , 'folderName')
_.getitem(id) is a method I frequently used in DTML but it didn't work in python.
 
what expression do I use to replace with self so ZOPE will create folders and files in the newly generated object?


 
____________________________________________________________________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070314/8d5d5008/attachment.htm


More information about the Zope mailing list