[ZPT] variable interpolation

Lynn Ranen lranen@verio.net
Thu, 5 Sep 2002 18:10:50 -0400


Hi -- I think this should be an easy one, but since I'm new to ZPT and to
Python, I'm beating my head against a wall!

How can I do this?  I've tried several syntaxes and none will parse.
Thansk !! lynn

<globalvars tal:define="global stringarg1 string:Other">
<globalvars tal:define="global SQL python:'select hours, workdate, heading
from task where headin
g = '%s';'  % stringarg1">

     <!-- DO THE QUERY HERE -->

</globalvars>
</globalvars>









//////  Errors Raised //////
    raise PTRuntimeError(str(self._v_errors))
Zope.PageTemplate.PageTemplate.PTRuntimeError: ['Compilation failed',
'HTMLParser.HTMLParseError: malformed start tag, at line 46, column 44']

    raise PTRuntimeError(str(self._v_errors))
Zope.PageTemplate.PageTemplate.PTRuntimeError: ['Compilation failed',
'exceptions.SyntaxError: invalid token (line 1)']