Add config helper
This commit is contained in:
parent
db0f524d9c
commit
908ca8327d
@ -3,8 +3,6 @@ from webassets import Environment, Bundle
|
|||||||
import tornado.web
|
import tornado.web
|
||||||
from atst.home import home
|
from atst.home import home
|
||||||
|
|
||||||
# module variables used by the handlers
|
|
||||||
|
|
||||||
assets = Environment(
|
assets = Environment(
|
||||||
directory = home.child('scss'),
|
directory = home.child('scss'),
|
||||||
url = '/static')
|
url = '/static')
|
||||||
@ -19,10 +17,11 @@ helpers = {
|
|||||||
'assets': assets
|
'assets': assets
|
||||||
}
|
}
|
||||||
|
|
||||||
class BaseHandler(tornado.web.RequestHandler):
|
|
||||||
|
|
||||||
|
class BaseHandler(tornado.web.RequestHandler):
|
||||||
def get_template_namespace(self):
|
def get_template_namespace(self):
|
||||||
ns = super(BaseHandler, self).get_template_namespace()
|
ns = super(BaseHandler, self).get_template_namespace()
|
||||||
|
helpers['config'] = self.application.config
|
||||||
ns.update(helpers)
|
ns.update(helpers)
|
||||||
return ns
|
return ns
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user