[Zope] Creating a DTM Document in a variable folder.
Jonathan Cyr
cyrj at cyr.info
Wed Nov 30 15:31:03 EST 2005
You might want to use index_html rather than index.html in this
example. The dot means other things in Python, and index.html is a
carryover from filesystem webservers. My impression is that the
acquisition mechanism doesn't like ids with a dot, in some circumstances.
Not trying to nit-pick, just got hung-up on that item myself once before.
...or maybe that's not true anymore and has been allowed for...
HTH,
-Jon
Peter Bengtsson wrote:
>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 at 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 at 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 at 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 )
>
>
>
--
Jonathan Cyr
http://www.cyr.info
http://www.weddingweblog.com
cyrj at cyr.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20051130/c257cbec/attachment.htm
More information about the Zope
mailing list