[Zope] HowTo call a Python Method from DTML-Document

Florent Guillaume fg@nuxeo.com
4 Oct 2001 13:52:09 GMT


> 2a) no actual parameters, no formal parameters:
> obviously, cant reach REQUEST, since zope complains
> >>nonexistent object or variable REQUEST.
> >>Info( (), {}, None )

You could use context.REQUEST in the python script here.


> 2b): giving Check formal Parameter REQ, call Check( REQUEST)
> results in REQ=the html-string delivered from REQUEST.__call__
> (the same as <dtml-var REQUEST>) and a string sure has no attribute
> "set"...

Isn't this the old "cached the result of evaluation even when it is
incorrect" problem ? See Dieter's doc at
http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html#c37ac15c14b4b5b2
and
http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html#c37ac15c14b4b7b5


Florent

-- 
Florent Guillaume, Nuxeo SARL (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com