[ZPT] Version 1.5.0
Godefroid Chapelle
gotcha@swing.be
Fri, 09 Aug 2002 12:35:51 +0200
Hi Evan,
I am using ZPT outside Zope to generate SQL.
I had something working. I just downloaded the three 1.5.0 files.
I have small remarks and a problem.
- TAL does now import zLog whic add a new dependency to the TAL package. I
wonder if it is really needed.
- under Python 2.2 I get deprecate messages about string module usage. (But
if I remember well corrections have been checked in already)
- METAL macro expansion which worked perfectly with previous version now
gives me the following error :
'''
Traceback (most recent call last):
File "generateDatabase.py", line 367, in ?
dg.main()
File "generateDatabase.py", line 37, in main
self.createIndividualFiles()
File "generateDatabase.py", line 48, in createIndividualFiles
self.createSQLsForTable(xmlSchemaFileName, tableName)
File "generateDatabase.py", line 160, in createSQLsForTable
self.createSQL(xmlSchemaFileName, tableName, directoryId, fileRootName)
File "generateDatabase.py", line 277, in createSQL
rpt.renderToFile(SQLOutputFileName)
File "renderPageTemplate.py", line 63, in renderToFile
outputData = self.render()
File "renderPageTemplate.py", line 67, in render
return self.pt.pt_render(extra_context=self.context)
File "c:\python21\lib\PageTemplates\PageTemplate.py", line 91, in pt_render
tal=not source, strictinsert=0)()
File "c:\python21\lib\TAL\TALInterpreter.py", line 159, in __call__
self.interpret(self.program)
File "c:\python21\lib\TAL\TALInterpreter.py", line 192, in interpret
handlers[opcode](self, args)
File "c:\python21\lib\TAL\TALInterpreter.py", line 351, in do_optTag_tal
self.do_optTag(stuff)
File "c:\python21\lib\TAL\TALInterpreter.py", line 336, in do_optTag
return self.no_tag(start, program)
File "c:\python21\lib\TAL\TALInterpreter.py", line 331, in no_tag
self.interpret(program)
File "c:\python21\lib\TAL\TALInterpreter.py", line 192, in interpret
handlers[opcode](self, args)
File "c:\python21\lib\TAL\TALInterpreter.py", line 482, in do_loop_tal
self.interpret(block)
File "c:\python21\lib\TAL\TALInterpreter.py", line 192, in interpret
handlers[opcode](self, args)
File "c:\python21\lib\TAL\TALInterpreter.py", line 351, in do_optTag_tal
self.do_optTag(stuff)
File "c:\python21\lib\TAL\TALInterpreter.py", line 336, in do_optTag
return self.no_tag(start, program)
File "c:\python21\lib\TAL\TALInterpreter.py", line 331, in no_tag
self.interpret(program)
File "c:\python21\lib\TAL\TALInterpreter.py", line 192, in interpret
handlers[opcode](self, args)
File "c:\python21\lib\TAL\TALInterpreter.py", line 516, in do_useMacro
macro = self.engine.evaluateMacro(macroExpr)
File "c:\python21\lib\PageTemplates\TALES.py", line 217, in evaluate
v = expression(self)
File "c:\python21\lib\PageTemplates\Expressions.py", line 192, in __call__
return self._eval(econtext)
File "c:\python21\lib\PageTemplates\Expressions.py", line 182, in _eval
ob = self._subexprs[-1](econtext)
File "c:\python21\lib\PageTemplates\Expressions.py", line 141, in _eval
ob = restrictedTraverse(ob, path, getSecurityManager())
File "c:\python21\lib\PageTemplates\Expressions.py", line 358, in
restrictedTr
averse
get(object, name)
AttributeError: formatFieldDef
'''
where formatFieldDef is a macro name.
I thought you might like to know.
I am sorry I cannot help as I do not really know the traversal mechanism
theory.
--
Godefroid Chapelle
BubbleNet sprl
rue Victor Horta, 18 / 202
1348 Louvain-la-Neuve
Belgium
Tel + 32 (10) 459901
Mob + 32 (477) 363942
TVA 467 093 008
RC Niv 49849