Hello all, I've created a simple DTML method, named TestZopeTime, to illustrate a problem I'm having: <html> <body> time: <dtml-var "ZopeTime()"> </body> </html> When I invoke this method directly through a web browser, I do get what I expect -- a display of the current time. No problem. However, when I try calling this DTML method from an external method, I get the error report: "Name not found or not allowed: ZopeTime" I can comment out the ZopeTime() call, and see that the External method is able to complete a call to the DTML method. I've tried installing ZDebug just now, but that hasn't given me any clues yet. I also re-read the "How-To: Using External Methods". My external method looks like this: def MyExternalMethod(self, PARMS): return self.TestZopeTime() I've also tried: def MyExternalMethod(self, PARMS): return self.TestZopeTime(REQUEST=self.REQUEST) It seems like a through-the-web call to a DTML method sets up a different namespace than when I call the same method from an external method. FWIW: I am triggering the call to the external method through xml-rpc. Any clues would be very welcome. Thanks in advance... Martin Stitt Esker, Inc. email: marty.stitt@esker.com
Marty Stitt wrote:
def MyExternalMethod(self, PARMS): return self.TestZopeTime(REQUEST=self.REQUEST)
Hmmm... try the following: def MyExternalMethod(self, PARMS): return self.TestZopeTime(self,REQUEST=self.REQUEST) cheers, Chris
Yes! Thanks. That works. Chris Withers wrote:
Marty Stitt wrote:
def MyExternalMethod(self, PARMS): return self.TestZopeTime(REQUEST=self.REQUEST)
Hmmm... try the following:
def MyExternalMethod(self, PARMS): return self.TestZopeTime(self,REQUEST=self.REQUEST)
cheers,
Chris
-- Martin Stitt Chief Software Engineer Esker, Inc. email: marty.stitt@esker.com phone: (608) 273-6000 x331 fax: (608) 273-8227 web: http://www.esker.com
participants (2)
-
Chris Withers -
Marty Stitt