[Mpuls-commits] r2054 - wasko/branches/2.0/mpulsweb/config
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Mar 23 08:47:15 CET 2010
Author: torsten
Date: 2010-03-23 08:47:15 +0100 (Tue, 23 Mar 2010)
New Revision: 2054
Modified:
wasko/branches/2.0/mpulsweb/config/environment.py
Log:
* mpulsweb/config/environment.py (load_environment): Initiate new
template lookup with automatic html-escaping.
Modified: wasko/branches/2.0/mpulsweb/config/environment.py
===================================================================
--- wasko/branches/2.0/mpulsweb/config/environment.py 2010-03-23 07:45:12 UTC (rev 2053)
+++ wasko/branches/2.0/mpulsweb/config/environment.py 2010-03-23 07:47:15 UTC (rev 2054)
@@ -28,6 +28,8 @@
import logging
from mako.lookup import TemplateLookup
+from pylons.error import handle_mako_error
+
from pylons import config
import mpulsweb.lib.helpers
@@ -80,10 +82,10 @@
# Create the Mako TemplateLookup, with the default auto-escaping
config['pylons.g'].mako_lookup = TemplateLookup(
directories=paths['templates'],
+ error_handler=handle_mako_error,
module_directory=os.path.join(app_conf['cache_dir'], 'templates'),
- input_encoding='utf-8', output_encoding='utf-8',
- imports=['from webhelpers.html import escape'],
- default_filters=['escape'])
+ input_encoding='utf-8', default_filters=['escape'],
+ imports=['from webhelpers.html import escape'])
# CONFIGURATION OPTIONS HERE (note: all config options will override
# any Pylons config options)
More information about the Mpuls-commits
mailing list