The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

HTML templating system recommendations for Python

Don't need a full framework like Django, just a templating system.

Only one I've looked at so far is Cheetah, looks like it would get the job done, but I was wondering if there were others that would be worth looking at.

It looks like the system will be serving on the order of a few queries a second at maximum load, so performance isn't the biggest issue.

So any advice would be helpful.
What is this Web stuff, anyway
Thursday, August 14, 2008
 
 
As with many things in the Python world, there are lots of options to choose from.  Two of my favorites are Genshi (http://genshi.edgewall.org/) and Mako (http://www.makotemplates.org).  Both are fast, easy to read and write, and fairly "pythonic". 

Personally I prefer Genshi for generating HTML, as the templates themselves are valid XHTML documents that can be edited in any visual editor, while Mako is great if you're generating non-HTML (plain text, source code, etc.)
Jason Abate Send private email
Thursday, August 14, 2008
 
 
I currently use Cheetah  (+1). It is very nice and can be used for a number of other things besides html.

The ability to include files within itself alone is a big plus.

I use it to power RSS feeds, HTML templates, and even EMail templates for Widefido.

I did try Mako and Genshi, but settled with Cheetah because I enjoyed it the most.
Jordan Sherer Send private email
Thursday, August 14, 2008
 
 
I use mako. It's faster than the django templating system, but I actually like django's syntax better.

You can use django's templating system independently, by the way -- it just takes some fiddling (you've got to set some variables that the template engine expects).
(User deleted) Send private email
Thursday, August 14, 2008
 
 
I have used htmltmpl it's old but simple.
Martin Send private email
Thursday, August 14, 2008
 
 
Another option is StringTemplate (http://www.stringtemplate.org).

Originally started as Java package, full featured Python and C# ports, written by the guy who built Antlr, so it's actually got some language design theory behind it.
Chris Tavares Send private email
Thursday, August 14, 2008
 
 
Thanks for the suggestions I will look at all of them since I'm just starting out on the project.
What is this Web stuff, anyway
Thursday, August 14, 2008
 
 
Kevin
Monday, August 18, 2008
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz