Kevin Dangoor wrote:

> I've already seen a decorator for using Cheetah. It's not hard,
> because you can just return a string and CherryPy will send it along.
> A plugin would be more graceful.

I don't know, all that seems necessary is IMO a simple "howto" bullet
point on how to use different template types easily (while retaining
Kid as the default/official/supported one). How much simpler does it
need to get? If much simplification is needed, it should be provided by
the projects that deliver the template engines.

That said, I don't understand all the hoopla around Cheetah. I've been
using EmPy (for non-web applications) and it seems to be much simpler
("@" is the only special character) without sacrificing the power or
ease. I'd need to see some benchmarks to draw a definite conclusion,
but I suppose a template that is "bytecompiled" to some intermediate
form (or even just having the "special" byte positions in a table)
could be the fastest one, and would benefit from a framework that
provides the precompilation machinery...

Perhaps TurboGears could have support for "pluggable" templating
engines as described in:

http://peak.telecommunity.com/DevCenter/setuptools#dynamic-discovery-of-services-and-plugins

Fictional example:

setup(
    # ...
    entry_points = {'turbogears.template_engine': '.em =
empy.tg_entrypoint'}
)

Reply via email to