Adding app_config and global_config to the template environment
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sat, 19 Nov 2011 14:31:37 +0000 (08:31 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sat, 19 Nov 2011 14:31:37 +0000 (08:31 -0600)
mediagoblin/tools/template.py

index 905a36df8fb920048f239fd0c299cca98805fde2..a0eaabe7236a9e8be7ba72e656bb9c2aeb173e3e 100644 (file)
@@ -55,6 +55,8 @@ def get_jinja_env(template_loader, locale):
     template_env.globals['fetch_messages'] = messages.fetch_messages
     template_env.globals['gridify_list'] = gridify_list
     template_env.globals['gridify_cursor'] = gridify_cursor
+    template_env.globals['app_config'] = mg_globals.app_config
+    template_env.globals['global_config'] = mg_globals.global_config
 
     if exists(locale):
         SETUP_JINJA_ENVS[locale] = template_env