Calling DTMLFile from an external method
Hi, I am trying to make an external-method from an Zope-2.1.4 version work under 2.4.3. In this method I had a call to HTMLFile like this: return HTMLFile("Extensions/authform.dtml",self.__dict__,globals())() apparently the signature has changed now I have to do return DTMLFile("authform",globals()) but this results always in: Error type: KeyError Error value: __name__ File /usr/local/ZopePark/tozo2.aixtraware.de/ZInstanceHome/Extensions/POSHClient .py, line 62, in GetAuth (Object: pay) File /usr/local/ZopePark/ZopeVersions/Zope-2.4.3/lib/python/App/special_dtml.py, line 173, in __init__ (Object: HTMLFile) File /usr/local/ZopePark/ZopeVersions/Zope-2.4.3/lib/python/App/special_dtml.py, line 106, in __init__ (Object: HTMLFile) File /usr/local/ZopePark/ZopeVersions/Zope-2.4.3/lib/python/App/Common.py, line 160, in package_home The lines starting from 103 in special_dtml.py def __init__(self,name,_prefix=None, **kw): if _prefix is None: _prefix=SOFTWARE_HOME elif type(_prefix) is not type(''): _prefix=Common.package_home(_prefix) args=(self, os.path.join(_prefix, name + '.dtml')) if not kw.has_key('__name__'): kw['__name__']=os.path.split(name)[-1] apply(ClassicHTMLFile.inheritedAttribute('__init__'),args,kw) and the lines starting from 167 in special_dtml.py def __init__(self, name, _prefix=None, **kw): self.ZBindings_edit(defaultBindings) self._setFuncSignature() apply(DTMLFile.inheritedAttribute('__init__'), (self, name, _prefix), kw)
From looking at the code, I would assume, that _prefix is None, since it is nowhere defined. But _prefix=Common.package_home(_prefix) is executed.
What's wrong here ? Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://germany.keyserver.net/en/
participants (1)
-
Joachim Schmitz