[Zope] Starting a dtml-method in a python script

hans hans@beehive.de
Wed, 13 Feb 2002 17:05:23 +0000


Sebastian Sippl wrote:

> i want to start a dtml-method from a python script.normally it should
> work like this:
>
> container.dtmlmethod()
>
> but !!!
>
> i always get a "global name REQUEST is not defined error".
>
> in the dtml-method are some REQUEST.set calls and it always crashes when
> my program gets to one of this...
>
> if i start the dtml-method normally there are no problems ...

seems there are defaults when calling dtml-methods from dtml-docs.
http://www.zope.org/Members/michel/ZB/AppendixB.dtml says
__call__(client=None, REQUEST={}, **kw)

try
container.dtmlmethod(None, REQUEST=REQUEST)