global's contents are added to the environment, so you can access the
contents but not the globals itself.

To access the globals itself try this:

globals = {}
globals['food'] ='bar'

cherrypy.request.jinja2_env.globals['globals'] = globals

Robin

On Jun 21, 3:55 pm, Voltron <[email protected]> wrote:
> I set a key in the globals dict as such:
>
> cherrypy.request.jinja2_env.globals['food'] ='bar'
>
> In my template, I tried rendering the value of "foo" as such:
>
> globals:{{ globals }}, this did nor produce anything, not even an
> error, is there something that I have missed?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" 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/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to