[MERGE/RFC][PQM] Switching the web UI to use a Mako template

Michael Hudson michael.hudson at canonical.com
Wed Jul 9 22:34:23 BST 2008


John Arbash Meinel wrote:
> Daniel Watkins wrote:
>> Attached is a patch which converts pqm.ui.twistd to use a Mako template
>> (at pqm/ui/template.html).  I believe this to have the following
>> benefits:
>>   * it is clearer what HTML will be produced
>>   * it decouples the presentation of the content from it's production,
>>     meaning either can be modified more easily
>>   * it will make creating an RSS feed of the same information easier,
>>     with much less code duplication
> 
>> I chose Mako because it is closest to Django templates, the templating
>> language with which I am familiar.  It is supported by both Pylons (as
>> the default) and TurboGears, so isn't going anywhere.  It is packaged
>> in Debian Etch and in Ubuntu Gutsy onwards.
> 
>> It's currently an RFC because the tests have not been updated to
>> reflect the switch from the old method, and because a solution to
>> finding the template needs to be found.
> 
> 
> 
> BB:comment
> 
> I would use the same templating engine as will be used with loggerhead. Last I
> checked, this was simpletal, though I know there was a lot of discussion
> before it was settled. (At one point they were looking at zope page templates,
> etc.)

Yeah, we use simpletal now, though I wouldn't say we're excruciatingly
happy with it -- if we could get the same performance out of genshi, I'd
prefer that.  But I doubt we'll get up the energy to change any time soon.

Um, is there a message to Daniel here?  I guess I'd have to disagree
with John a bit, I don't _really_ see the benefit of using the same
templating engine as loggerhead, apart from trimming dependencies perhaps.

Cheers,
mwh




More information about the bazaar mailing list