[Zope] Python Script REQUEST namespace not found.

Dieter Maurer dieter@handshake.de
Wed, 4 Sep 2002 20:30:16 +0200


H.Tan writes:
 > I'm trying to write my first python script by passing parameter through the
 > REQUEST object as following:
 > 
 > 
 > ---------------------------
 > In the Python Script:
 > 
 > Parameter: name="world"
 > return "Hello %s" %name
 > ------------------------
 > 
 > in my DTML-Document:
 > 
 > <dtml-call "REQUEST.set('name', 'John')">
 > <dtml-var hello>
Parameters are only magically passed into Python scripts when they
are called directly from the Web (this is ZPublisher magic)
or when they bind (--> "Bindings" tab) the DTML namespace (this is
DTML magic).

When possible, you should not rely on magic, but pass the parameters
explicitly:

	<dtml-var expr="hello('John')">


Dieter