[Zope] HTML Document

John Whalley J.H.Whalley@mmu.ac.uk
Thu, 18 Jul 2002 10:14:31 +0100


Hi,

I've only done this in DTML, rather than Python scripts.

My working DTML is:

<dtml-with "manage_addProduct['HTMLDocument']">
<dtml-call expr="addHTMLDocument(id='', file=file)">
</dtml-with>

HTMLDocument derives title from the HTML document's <title> tag.

I'm a complete newbie with respect to Python scripts, but my guess
would be that:

context.manage_addProduct['OFSP']

should be:

context.manage_addProduct['HTMLDocument']

HTH
John


<bk_andre@ns1.netonshop.dk> 18/07/02 09:39:23:

>I have tried the following:
>-----------------------------------------------------
>"""
>Opretter et stævne
>"""
># Opret unik id
>id = 'entry_%d' % len(context.objectIds())
>
># Opret stævnet
>context.manage_addProduct['OFSP'].manage_addHTMLDocument(id, file='',

>title=stv_name)
>
>
>doc=getattr(context, id)
>doc.manage_addProperty('start', start, 'string')
>
>------------------------------------------------------
>
>When i run the script i get the following error:
>
>
>Zope Error
>Zope has encountered an error while publishing this resource.
>
>Error Type: AttributeError
>Error Value: manage_addHTMLDocument
>
>
>Do you have any idea??
>
>
>Jens
>
>
>Citat John Whalley <J.H.Whalley@mmu.ac.uk>: 
>
>> Try: addHTMLDocument
>> 
>> Seems to work for me.
>> 
>> HTH
>> John Whalley
>> 
>> 
>> andre <zope@bkinformatik.dk> 17/07/02 21:05:21:
>> 
>> >If i use the HTMLDocument product, how can i then make it possible
>> for
>> a user 
>> >to upload a file from a HTML-Form. I can't find a method like the
>> addFile, 
>> >addImage etc.
>> >
>> >Thank's in advance
>> >
>> >Jens Bjerre



-- 
* John Whalley, Crewe Site Library, Manchester Metropolitan University
* email: J.H.Whalley@mmu.ac.uk
* Phone: (+44) 161 247 5220 (UK)
* Usual disclaimer applies...........