Add config helper

This commit is contained in:
Brian Duggan 2018-06-08 11:31:16 -04:00 committed by Jason Garber
parent db0f524d9c
commit 908ca8327d

View File

@ -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