[Zope] call DTMLMethod with parameter from Python

Dieter Maurer dieter@handshake.de
Fri, 29 Mar 2002 12:14:02 +0100


Robert Rottermann writes:
 > In ZPT _ is here. Therefore you could try :
 > <span tal:replace="structure python:here.myDTMLMethod( None, here,
 > optionalkey1='yada' )"> ...
I do not agree with this statement:

  There is no equivalent of "_" in ZPT: The ZPT namespace is flat,
  initially filled with the predefined variables "here", "user", "nothing", ...
  and augmented by the variables defined by "tal:define".

  Furthermore, "here" corresponds to the "client" of DTML objects
  (and is similar to "this"). It is an object while the second
  parameter to DTML objects requires a mapping.


You probably would use something like:

  <span tal:replace="structure python:here.myDTMLMethod(here, request, ...">


Dieter