From 2bb08469fae4f8222691f2afe048b4d12ea433db Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Tue, 10 Jun 2014 21:23:20 -0400 Subject: [PATCH] Migrate to the new pyramid_mako plugin. --- xonstat/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xonstat/__init__.py b/xonstat/__init__.py index ef16ec9..25f4a77 100644 --- a/xonstat/__init__.py +++ b/xonstat/__init__.py @@ -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') -- 2.39.2