[Grok-dev] megrok.chameleon template engine
Uli Fouquet
uli at gnufix.de
Sun Feb 22 09:24:56 EST 2009
Hi there,
There is now a `megrok.chameleon` template engine available for use with
Grok:
http://pypi.python.org/pypi/megrok.chameleon
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.
Note, that the package only works with Python2.5 (due to chameleon uses
Python2.5 expressions)!
`megrok.chameleon` registers the following new template filename
extensions:
* `.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::
tal:replace='view/somevalue'
anymore but instead::
${view.somevalue}
* `.cg`: Chameleon driven Genshi Template
Genshi-like templates. See
http://pypi.python.org/pypi/chameleon.genshi
* `.cgt`: Chameleon driven Genshi Text Template
Genshi-like text templates.
The package is currently only a quick hack, probably not implemented
very smart, but you might give it a try in non-production environments.
Any feedback is very welcome.
Best regards,
--
Uli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20090222/3dff0cbf/attachment.bin
More information about the Grok-dev
mailing list