[Zope] python script returning DTMLMethod problem
Tom Germaine
tgermaine@upei.ca
Wed, 07 Aug 2002 14:02:52 -0300
Thanks, this solution solves the problem of script returning
DTMLMethod:
<dtml-var standard_html_header>
<dtml-var REQUEST>
<dtml-var standard_html_footer>
but this solution does not help me with my original problem of
returning this DTMLMethod:
<html>
<head></head>
<body>
<h2>AVC files:</h2>
<dtml-call "REQUEST.set('expand_all',_.int(1))">
<dtml-tree avc branches_expr="objectValues(['Folder','DTML
Document'])"
sort=id>
<dtml-if "meta_type=='Folder'">
<dtml-if expr="title == ''">
<dtml-else>
<h3><dtml-var title ></h3>
</dtml-if>
</dtml-if>
<dtml-if "meta_type=='DTML Document'">
<dtml-if "title == ''">
<dtml-else>
<li><dtml-var id>:: <A HREF="&dtml-absolute_url;"
target=display>
<dtml-var title></a></li>
</dtml-if>
</dtml-if>
</dtml-tree>
</body>
</html>
with error message
Error Type: KeyError
Error Value: URL
Any further suggestions would be appreciated.
Tom
On 7 Aug 2002, at 16:24, DA Loeffler wrote:
> On Wed, 7 Aug 2002, Tom Germaine wrote:
>
> > Even if the script:
> > return context.showUploadRequests()
> >
> > calling a simple DTML method:
> > <dtml-var standard_html_header>
> > <dtml-var REQUEST>
> > <dtml-var standard_html_footer>
> >
> > fails with error:
> > Error Type: KeyError
> > Error Value: standard_html_header
>
> This one should work as
> return context.showUploadRequests(context)
>
> Certainly I have written lots of Python scripts which include the line
> print context.standard_html_header(context)
>
> David
>