[ZPT] Usage example for standalone PageTemplates?
Guido van Rossum
guido@digicool.com
Fri, 30 Mar 2001 12:33:17 -0500
> I've adapted the following demo program from driver.py. However I can't see
> from the TAL source code how to pass the data that I want to be substituted
> into the template; so in the program below I've resorted to hard-coding the
> data in the template itself (just as the input file used by driver.py seems
> to do). But how do I pass the data from 'record' into the template instead?
You can stick it in the engine's globals using
e.g. engine.setGlobal('name', 'Hamish').
--Guido van Rossum (home page: http://www.python.org/~guido/)