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
This commit is contained in:
erlehmann 2008-10-05 13:04:48 +00:00
parent 11574c1ce7
commit 0025e036bf

View file

@ -36,6 +36,10 @@ def load_environment(global_conf, app_conf):
# any Pylons config options) # any Pylons config options)
config['pylons.response_options']['content_type'] = "application/xhtml+xml" 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 = engine_from_config(config, 'sqlalchemy.')
model.metadata.bind.echo = True model.metadata.bind.echo = True
# better safe than sorry - everything should be utf-8
tmpl_options['mako.input_encoding'] = 'utf-8'