From 32a7e6821688ba0445f28d27fe972caeadf141b8 Mon Sep 17 00:00:00 2001 From: tobes Date: Wed, 21 Nov 2012 15:53:57 +0000 Subject: [PATCH] Do not give config to jinja templates --- ckan/lib/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ckan/lib/base.py b/ckan/lib/base.py index 904c61a00bd..f0b137ebbd0 100644 --- a/ckan/lib/base.py +++ b/ckan/lib/base.py @@ -128,6 +128,10 @@ def render_template(): # Jinja2 templates if template_type == 'jinja2': + # We do't want to have the config in templates it should be + # accessed via g (app_globals) as this gives us flexability such + # as changing via database settings. + del globs['config'] # TODO should we raise error if genshi filters?? return render_jinja2(template_name, globs)