Move the encoding config to a place where it actually gets applied!
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 02 Dec 2009 15:27:49 -0500
changeset 19 5710c4c527cc
parent 18 de7c999d38d7
child 20 576078244fc5
push id16
push userbsmedberg@mozilla.com
push dateWed, 02 Dec 2009 20:27:53 +0000
Move the encoding config to a place where it actually gets applied!
weeklyupdates/main.py
--- a/weeklyupdates/main.py
+++ b/weeklyupdates/main.py
@@ -383,26 +383,25 @@ def render_error(**kwargs):
     return render('error.xhtml', **kwargs)
 
 class Application(cherrypy.Application):
     _pool = None
 
     def __init__(self, script_name='', config=None):
         cherrypy.Application.__init__(self, None, script_name, config)
         self.merge({
-            'global': {
-                'tools.encode.on': True,
-                'tools.encode.encoding': 'utf-8',
-                },
             '/static': {
                 'tools.staticdir.on': True,
                 'tools.staticdir.dir': 'static',
                 'tools.staticdir.root': thisdir,
                 },
             '/': {
+                'tools.encode.on': True,
+                'tools.encode.encoding': 'utf-8',
+                'tools.encode.add_charset': True,
                 'tools.weeklyauth.on': True,
                 'tools.sessions.on': True,
                 'error_page.default': render_error,
                 'request.dispatch': dispatcher,
                 }
             })
 
     def connectionpool(self):