>> Could you please tell me what templating library you use and what are its 
>> differences and similarities compared to Templetor?
>> 
>> I'm particularly interested in the following:
>> 
>> * flexibility in combining and splitting templates and partials
>> * can be used with jQuery code and any plain-text format
>> * ability to use regular Python (or subset thereoff) in template code
> 
> Try Genshi. I haven't used it really, but I find it quite elegant.

I’ve used Genshi[1] in all of my projects except one, which I used Kid.  (Kid 
is basically a slightly less efficient Genshi.)

These days, though, I don’t program for specific templating engines; sometimes 
I find one that works better for a specific purpose (e.g. using Mako[2] to make 
text templates for e-mail).  I’ve been using (and, full disclosure, writing) 
the Common Template Interface[3] which should provide a unified interface to 
the various templating languages in Python.

One thing to note (and this isn’t a problem for most people): Genshi is really 
slow compared to everything else because it is a full XML processor.  This 
makes it powerful, but it slows down the more complicated the resulting XHTML 
is.    Being an XML processor allows your templates to be edited in common 
WYSIWYG editors without disturbing your program instructions; which makes you 
and your designer happy.  Mako, on the other hand, is about as fast as you can 
go.

[1] http://genshi.edgewall.org/
[2] http://www.makotemplates.org/
[3] http://github.com/GothAlice/TemplateInterface/

        — Alice.

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to