> On Dec 20, 9:05 pm, Mike Orr <[email protected]> wrote:
>> How do you add variables to the globals? I think you'd have to
>> override render_mako.


On Sun, Dec 20, 2009 at 2:51 PM, Damian <[email protected]> wrote:
> you define them in the Global object.
>
> class Globals(object):
>    myconstant = 'astring'

Ah, I meant something different.  I meant, how do you put 'g' into the
template namespace, if you like it better than 'app_globals'?  The
globals are returned by pylons.templating.pylons_globals(), which
render_mako merges into the template namespace. So it looks like you'd
have to override render_mako, since there's no way to plug
customization into the function.

-- 
Mike Orr <[email protected]>

--

You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.


Reply via email to