[Grok-dev] megrok.chameleon template engine
wichert at wiggy.net
Sun Feb 22 10:15:47 EST 2009
Previously Uli Fouquet wrote:
> It provides support for chameleon-driven Zope page templates and also
> for Genshi templates. Chameleon is the template engine also used by
> repoze.bft and it (chameleon) is said to be faster than regular Zope
> page templates.
By a factor of 12 currently if I remember correctly.
> Note, that the package only works with Python2.5 (due to chameleon uses
> Python2.5 expressions)!
Both chameleon.zpt and chameleon.genshi work fine with python 2.4, so I
do not understand where this claim comes from.
> `megrok.chameleon` registers the following new template filename
> * `.cpt`: Chameleon Page Template
> Those templates behave similar to regular Zope page templates
> (.pt-files) but use Python expressions by default and support
> Genshi-like variable substitutions. So you do not write::
> anymore but instead::
You can still use tal:replace as well of course: you can freely use both
forms in the same file.
Wichert Akkerman <wichert at wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
More information about the Grok-dev