Changeset - 54e9131c3aa6
[Not reviewed]
default
0 1 0
Mads Kiilerich - 10 years ago 2016-05-04 01:18:25
madski@unity3d.com
templates: be more strict about mako errors

We prefer to find errors early.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/config/environment.py
Show inline comments
 
@@ -79,12 +79,13 @@ def load_environment(global_conf, app_co
 
    pylons.cache._push_object(config['pylons.app_globals'].cache)
 

	
 
    # Create the Mako TemplateLookup, with the default auto-escaping
 
    config['pylons.app_globals'].mako_lookup = mako.lookup.TemplateLookup(
 
        directories=paths['templates'],
 
        error_handler=pylons.error.handle_mako_error,
 
        strict_undefined=True,
 
        module_directory=os.path.join(app_conf['cache_dir'], 'templates'),
 
        input_encoding='utf-8', default_filters=['escape'],
 
        imports=['from webhelpers.html import escape'])
 

	
 
    # sets the c attribute access when don't existing attribute are accessed
 
    config['pylons.strict_tmpl_context'] = True
0 comments (0 inline, 0 general)