folder = getattr(context, 'b')
adder = folder.manage_addProduct['OFSP'].methodAdd
adder('index.html', 'Some title')
That creates it with default content. To change it you'll have to call
dtmlm = getattr(context, 'index.html')
dtmlm.manage_edit("bla bla bla bla bla", 'Same title')
# or
f = open('/tmp/foobar.html')
dtmlm.manage_upload(f)
On 11/25/05, Martin Koekenberg <martin@digital-adventures.nl> wrote:
Hello,
I don't have any Python experience yet, so who has a solution for this
'problem'.
Example:
I 've 3 folders a, b & c.
I want to create a dtml document in a folder by a form. The folder is a
variable in my form.
The formis no problem, the form action is no problem. The python script to
craete that document is my problem.
How can I create a DTM Document in a variable container ?
Regards,
Martin Koekenberg
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )