Yes, sort of. TurboGears is using what they're calling the "open
template plug-in engine" something or rather. The underlying effect is
it provides a unified way to render templates. It's still undergoing
some fine-tuning, and is not part of TurboGears itself. Here's the
'spec' for making a template language available for automatic plug-in
discovery:
http://www.turbogears.org/docs/plugins/template.html

And here's how I adapated it in Pylons to automatically allow me to use
any of the template languages supporting it:
http://pylons.groovie.org/project/pylons/browser/trunk/pylons/util.py#L204

Also note that there is some code at the top of that file that handles
scanning the setuptools entry points to search for template languages.
I adapted my 'Buffet' code from the Buffet project here:
http://projects.dowski.com/projects/buffet

This 'standard' is still being developed, but this current solution is
working right now and being used. Django could rather easily adapt the
same pieces of code to allow the use of these same template language
plug-ins.

As my interest is in using Django templates, if there's specific needs
that Django templates have that the current plug-in system doesn't
address I'll be happy to try and lobby on behalf of Django for any
changes necessary to support Django templates. AFAIK, the current setup
should work fine.

- Ben

Reply via email to