예제 #1
0
 def get_app(self):
     hooks_cls = self.cfg.get('hooks_cls', 
                              'stubo.ext.transformer.StuboDefaultHooks')
     self.cfg['hooks'] = resolve_class(hooks_cls)
     tornado_app = tornado.web.Application(
         static_path=static_path(),
         template_path=static_path('templates'),
         xheaders=True,
         **self.cfg)          
     tornado_app.add_handlers('.*$', self._make_route_list())
     return tornado_app
예제 #2
0
 def get_app(self):
     hooks_cls = self.cfg.get('hooks_cls',
                              'stubo.ext.transformer.StuboDefaultHooks')
     self.cfg['hooks'] = resolve_class(hooks_cls)
     tornado_app = tornado.web.Application(
         # adding static path (PROJECT_ROOT/stubo/static
         static_path=static_path(),
         # adding template path (PROJECT_ROOT/stubo/templates)
         template_path=os.path.join(stubo_path(), 'templates'),
         xheaders=True,
         **self.cfg)
     tornado_app.add_handlers('.*$', self._make_route_list())
     return tornado_app
예제 #3
0
 def get_app(self):
     hooks_cls = self.cfg.get("hooks_cls", "stubo.ext.transformer.StuboDefaultHooks")
     self.cfg["hooks"] = resolve_class(hooks_cls)
     tornado_app = tornado.web.Application(
         # adding static path (PROJECT_ROOT/stubo/static
         static_path=static_path(),
         # adding template path (PROJECT_ROOT/stubo/templates)
         template_path=os.path.join(stubo_path(), "templates"),
         xheaders=True,
         **self.cfg
     )
     tornado_app.add_handlers(".*$", self._make_route_list())
     return tornado_app