]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Migrate to the new pyramid_mako plugin.
authorAnt Zucaro <azucaro@gmail.com>
Wed, 11 Jun 2014 01:23:20 +0000 (21:23 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Wed, 11 Jun 2014 01:23:20 +0000 (21:23 -0400)
xonstat/__init__.py

index ef16ec98e54daff6830a025e90cc61f37375638e..25f4a77c853043e1cb7b022f8619f1992f97e858 100644 (file)
@@ -24,14 +24,18 @@ def main(global_config, **settings):
 
     config = Configurator(settings=settings)
 
+    # mako for templating
+    config.include('pyramid_mako')
+
+    # for json-encoded responses
+    config.add_renderer('jsonp', JSONP(param_name='callback'))
+
     # authentication and authorization policies
     authn_policy = AuthTktAuthenticationPolicy('secret', hashalg='sha512')
     authz_policy = ACLAuthorizationPolicy()
     config.set_authentication_policy(authn_policy)
     config.set_authorization_policy(authz_policy)
 
-    config.add_renderer('jsonp', JSONP(param_name='callback'))
-
     # for static assets
     config.add_static_view('static', 'xonstat:static')