[ZPT] variable interpolation

Chris Withers chrisw@nipltd.com
Fri, 06 Sep 2002 12:38:20 +0100


What error do you get?

cheers,

Chris


Lynn Ranen wrote:
> 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)']
> 
> 
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt
> 
>