[Zope] DTML into Python for Formulator

Dieter Maurer dieter@handshake.de
Sat, 12 Jan 2002 19:37:07 +0100


cgreen writes:
 > ... DTML object ...
 > The values of the "topic" property are returned.  But when called as an 
 > override method for a Formulator MultiListField, I get this error:
 > 
 > 
 >             Zope Error
 > 
 >             Zope has encountered an error while publishing this resource.
 > 
 >             Error Type: NameError
 >             Error Value: global name 'REQUEST' is not defined
I guess, it is a standard error:

  Whenever DTML objects are called explicitly, they should
  get 2 positional parameters. These parameters are necessary
  to provide the context to the DTML object call.

  In your case, the context is obviously missing.

Please read the section "Calling DTML objects" in 

  <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>

to learn more.


Dieter