From 908ca8327d08043f084d22c2091f67eea7b5ea1f Mon Sep 17 00:00:00 2001 From: Brian Duggan Date: Fri, 8 Jun 2018 11:31:16 -0400 Subject: [PATCH] Add config helper --- atst/handler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/atst/handler.py b/atst/handler.py index 26595b3d..40d57c5a 100644 --- a/atst/handler.py +++ b/atst/handler.py @@ -3,8 +3,6 @@ from webassets import Environment, Bundle import tornado.web from atst.home import home -# module variables used by the handlers - assets = Environment( directory = home.child('scss'), url = '/static') @@ -19,10 +17,11 @@ helpers = { 'assets': assets } -class BaseHandler(tornado.web.RequestHandler): +class BaseHandler(tornado.web.RequestHandler): def get_template_namespace(self): ns = super(BaseHandler, self).get_template_namespace() + helpers['config'] = self.application.config ns.update(helpers) return ns