[Web-SIG] Standardized template API

Ian Bicking ianb at colorstudy.com
Tue Jan 31 16:30:43 CET 2006

Jim Fulton wrote:
>>I think a lot of web frameworks and applications are using a template 
>>engine. We should probably have an officially sanctioned templating 
>>engine plugin API, as it would ease adoption of existing Python web 
>>framework solutions.
>>I think all it would take is a Web-Sig (and perhaps a PEP) blessing the 
>>TurboGears template engine plugin API [1].
> Different frameworks will have very different ways of handling templates.
> I don't think there is a standard way to do this and I don't think it
> would be appropriate for the web-sig to try to pick one.

Right now there is a significant intersection of templates and 
frameworks where this applies, but that intersection is not 
all-encompassing.  This interface will only work for template languages 
that are given some dictionary of values and have internal logic to 
render that.  This includes most current Python templating languages, 
but does not include templates like PyMeld (and derivatives) which are 
just structures manipulated from the outside, or templates like Nevow 
that are based on callbacks.

Just because there is a standard doesn't mean anyone has to use it.  I 
don't see why every standard has to satisfy everyone; if 50% of people 
use a standard instead of using framework-specific ad hoc interfaces, 
that's useful enough.  Especially a standard like this which doesn't 
imply much of any logic, it's just something you use.

Ian Bicking  |  ianb at colorstudy.com  |  http://blog.ianbicking.org

More information about the Web-SIG mailing list