Add config helper
This commit is contained in:
parent
db0f524d9c
commit
908ca8327d
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user