[Zope] odd behavior when External Method calls DTML Method
Dieter Maurer
dieter@handshake.de
Thu, 18 Apr 2002 23:36:53 +0200
Brian Withun writes:
>
> I am experiencing some kind of acquisition problem when calling DTML Methods
> from External Methods
>
> In a nutshell, I have a dtml method:
>
> ---------------------(test1_dtml)---
> <dtml-var URL>
> ------------------------------------
>
> ...which renders fine when I view it using a web browser.
> When I test an external method which calls this DTML method, however,
> I get this traceback:
>
> Traceback (innermost last):
> ....
> line 473, in __call__
> (Object: test1_dtml)
> KeyError: URL
>
> This is the module containing the function for my External Method:
>
> --------------------(myModule.py)---
> def test1( self ):
> return self.Test.test1_dtml( self )
> ------------------------------------
Please read "Calling DTML objects" in
<http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html>
The second parameter "self.REQUEST" is missing...
Dieter