[Buildbot-devel] Template system for HTML views (#342 and 1.0)

Marcus Lindblom macke at yar.nu
Thu May 7 12:35:06 UTC 2009


Stefan Seefeld wrote:
> Marcus Lindblom wrote:
>> Hi,
>>
>> It'd be nice to use a proper HTML template system, rather than manually 
>> concatenating pieces of text. (This has problems, like 
>> http://buildbot.net/trac/ticket/342).
>>
>> Also, for 1.0, it'd be good to build all the HTML from scratch using 
>> something nice that is easily customizable/extendable.
>>
>> I've only got experience with Django's default tempalte system, which 
>> can be a bit limiting at times. (No comparison operators for instance.
>>
>> Trac uses Genshi, an all python template library which I think is 
>> slightly xml-ified.
>>
>> I'm sure there are others. Any preferences?
>>   
> 
> jinja(2) (http://jinja.pocoo.org/), which is used by sphinx (python's 
> own documentation generator).
> I'd not call it a preference of mine (yet), but it is quite expressive 
> and easy to use.

Looks good. I've heard the name before, but no more. It's quite similar 
to Django, so it's something I can work with right away, but still a bit 
more expressive, which is nice, since buildbot develpers/users are moer 
developers than web designers. :)

>> I'm asking because I'd like to muck about with it a bit, and it'd be 
>> nice to choose something suitable for all. :)
>>   
> I agree about the general idea of using a templating tool for the html 
> frontend. As long as the interface is well encapsulated, it shouldn't be 
> hard to change the specific tool, if ever this may become desirable. 
> Other than that, I guess it's more important just to pick one and get 
> started, than to decide which one. (I'm slightly afraid of another 
> language / tool bikeshed discussion / flamewar... :-) )

I'd just want to pick something reasonably popular. Jinja surely fits 
that bill (being used by Python itself).

It also seems to be possible to run it python-only. That is good, as it 
reduces the burden on users.

Unless anyone objects, I'll poke around with Jinja a bit and see if it 
bites or behaves. ;(

Cheers,
/Marcus





More information about the devel mailing list