7 May
2002
7 May
'02
12:17 p.m.
Tim Lynch wrote:
How do I make use of DTMLFile from an External Method?
No matter what I try, I can't get it to work. I think I'm now close, but can't get past this latest problem:
Here's my External Method:
---- from Globals import InitializeClass, DTMLFile, package_home from Acquisition import Implicit from Globals import Persistent from DocumentTemplate import HTML
def tst1():
stuff = DTMLFile('Extensions/sample', globals()) results = stuff()
return results
<untested> First define the dml method "sample" somewhere in Zope. Ie. in the same folder as your external method: And then put something like this in the external method: def tst1(self): return self.sample(None, self) </untested> regards Max M