From 0025e036bf37872199ae9b3acd742cb9072cfbf2 Mon Sep 17 00:00:00 2001 From: erlehmann Date: Sun, 5 Oct 2008 13:04:48 +0000 Subject: [PATCH] making templates unicode safe (python 2.x default encoding is ASCII) git-svn-id: http://yolanda.mister-muffin.de/svn@383 7eef14d0-6ed0-489d-bf55-20463b2d70db --- trunk/yolanda/config/environment.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trunk/yolanda/config/environment.py b/trunk/yolanda/config/environment.py index e12c7d4..0da1e3e 100644 --- a/trunk/yolanda/config/environment.py +++ b/trunk/yolanda/config/environment.py @@ -36,6 +36,10 @@ def load_environment(global_conf, app_conf): # any Pylons config options) config['pylons.response_options']['content_type'] = "application/xhtml+xml" - + # FIXME: this is generally wrong for other XML content + model.metadata.bind = engine_from_config(config, 'sqlalchemy.') model.metadata.bind.echo = True + + # better safe than sorry - everything should be utf-8 + tmpl_options['mako.input_encoding'] = 'utf-8'