HTML Templating (Was Re: [ANN] HTMLTemplate 1.0.0)

Chris Green cmg at
Wed Jun 9 18:40:06 CEST 2004

David Fraser <davidf at> writes:

> It looks cool because it doesn't embed Python code in the template.
> Do any of the other frameworks have this approach?

My favorite right now seems to be clearsilver (
). It has just enough functionality in the templates to allow people
to do a few presentation layer if statements.   The key concept they
push is the backend populates a nested dataset that can be serialized
so designers and programmers can agree on the data format from the
start and go about their separate ways.  Their website has a few
really good tutorials on how to use it.  A really big plus for me is
since the do that it's a C library on the backend so if for whatever
reason you needed to reimplement the backend in something other than
python (god forbid :)), you have that flexibility.

I tried to wrap my head around nevow and I decided I don't like
pulling data at the point at which we need it and I don't like coding
renderers in python. That really just makes me think at some point a
designer would be coming over asking to change the way something looks
by editing the rendering code.

The thing that I found coolest about nevow from a templating system
perspective was that it's templates could have renderable data in
them so the designer could have a template with real data in it.  I
still have a sneaking suspicion that I'm missing the forest with
nevow however..

Where do people prefer to put the logic that says "this row should be
blue and the next one is white"?  
Chris Green <cmg at>
To err is human, to moo bovine.

More information about the Python-list mailing list