def app(self, dispatch, parsed):
# Make sure we get an argh-like object here that has a dispatch object
if dispatch is None:
if not hasattr(self._parser, 'dispatch'):
raise ValueError("Can't dispatch a non dispatchable parser without a dispatch method")
dispatch = self._parser.dispatch
parsed = False
class WebuiPageWrapper(page.WebuiPage):
_parser = self._parser
_dispatch = dispatch
_parsed = parsed
urls = ('/', 'index')
classes = {'index': WebuiPageWrapper}
return web.application(urls, classes)
评论列表
文章目录