Re: How are c/h/etc provided to templates?

2008-06-26 Thread Brian Rue
In pylons 0.9.6.1, try modifying app/lib/base.py like this: -from pylons.templating import render +from pylons.templating import render as pylons_render +object1 = {'foo': 'bar'} +def render(*args, **kwargs): +kwargs['object1'] = object1 +return pylons_render(*args, **kwargs) Hope that

Re: How are c/h/etc provided to templates?

2008-06-25 Thread Isaac Csandl
On Jun 24, 10:33 pm, Jonathan Vanasco [EMAIL PROTECTED] wrote: wait, i'm looking at this again... i'm not seeing any way to push custom vars into the render function outside of monkeypatching or doing something to render Correct. I don't think there's a (sane) way to do that from

How are c/h/etc provided to templates?

2008-06-24 Thread Jonathan Vanasco
I'm trying to make two other objects available to all templates. I'm wondering what the best practice would be. Looking at pylons.templating, I'm honestly a bit confused about what is going on. ( and if you're wondering: object1 is a version of pylons.c that is for the underlying framework we

Re: How are c/h/etc provided to templates?

2008-06-24 Thread Isaac Csandl
On Jun 24, 9:25 am, Jonathan Vanasco [EMAIL PROTECTED] wrote: I'm trying to make two other objects available to all templates. I'm wondering what the best practice would be. Looking at pylons.templating, I'm honestly a bit confused about what is going on. ( and if you're wondering:

Re: How are c/h/etc provided to templates?

2008-06-24 Thread Shannon -jj Behrens
On Tue, Jun 24, 2008 at 7:25 AM, Jonathan Vanasco [EMAIL PROTECTED] wrote: I'm trying to make two other objects available to all templates. I'm wondering what the best practice would be. Looking at pylons.templating, I'm honestly a bit confused about what is going on. ( and if you're

Re: How are c/h/etc provided to templates?

2008-06-24 Thread Jonathan Vanasco
wait, i'm looking at this again... i'm not seeing any way to push custom vars into the render function outside of monkeypatching or doing something to render i could put my new objects in pylons.c / pylons.g there trivially, but i dont think i can bust out of them cleanly.