9 messages in com.googlegroups.pylons-discussRe: ClearSilver & Pylons: how?
FromSent OnAttachments
Vit26 Oct 2006 14:11 
bruno desthuilliers26 Oct 2006 15:14 
Shannon -jj Behrens27 Oct 2006 11:56 
Bruno Desthuilliers30 Oct 2006 01:23 
Vit06 Nov 2006 14:25 
Shannon -jj Behrens07 Nov 2006 11:35 
bruno desthuilliers07 Nov 2006 12:24 
Matt Good07 Nov 2006 14:25 
iGL08 Nov 2006 08:01 
Subject:Re: ClearSilver & Pylons: how?
From:Shannon -jj Behrens (jjin@public.gmane.org)
Date:10/27/2006 11:56:01 AM
List:com.googlegroups.pylons-discuss

On 10/26/06, bruno desthuilliers <brun@public.gmane.org>
wrote:

Vit a écrit :

Hello,

Could someone share ideas/examples how to use ClearSilver together with Pylons?

One of the problems with^Mfeatures of clearsilver is that it's a pure push templating system. This means you have to feed it exactly all the data it needs. Pylons is mostly based on Mighty, which is much more a pull templating system.

I think the best way to go would be to add an additional (python coded) 'view' layer that implements the Buffet API and uses the pylons c, h, m etc to feed the data to clearsilver's HDF and calls the clearsilver template. That is, instead of having the view and template stuff combined in the 'template' - as with Mighty (or genshi or cheetah etc...), have them in two distinct objects : the (python) View, and the cs template itself. FWIW, this is mostly what I end up doing for Trac plugins to avoid putting too much view logic into the controllers.

Didn't Trac recently switch from ClearSilver to Genshi?

(BTW, I *love* Trac.)

Best Regards, -jj