[Zope] programmatically adding documents and properties

Kevin L kevinsl@yahoo.com
Wed, 25 Jul 2001 16:16:29 -0700 (PDT)


Hi,

I want to do the following from a Python Script:

- create a Folder
- create a DTML Document within that folder
- add a property to this new DTML Document

I've got it all working except the last part.

here's my code:

---------------------------------------
folder_name = 'test_folder'
document_name = 'test_document'

context.manage_addFolder(folder_name, 'folder title')
f = getattr(context, folder_name)
f.manage_addDTMLDocument(folder_name,'document title')
' what to do here? I think it should be:
'   f.getattr(context,document_name).manage_addProperty(etc)
' but it's not working
print 'done'
return printed
-----------------------------------------

I'm just having trouble getting the new document object that's
just been created. Can someone help?

thanks much

-Kevin

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/