def content(self): controllers = odict() map_controllers('', get_root_controller(), controllers) return unicode(render( dict(controllers=controllers), 'genshi', 'tgext.debugbar.sections.templates.controllers' ).split('\n', 1)[-1])
def content(self): controllers = odict() map_controllers('', get_root_controller(), controllers) return unicode_text( render(dict(controllers=controllers), tg.config['debugbar.engine'], 'tgext.debugbar.sections.templates.controllers!html').split( '\n', 1)[-1])
def render_first(self, response): try: self.app_config.hooks['after_render'].remove(self.render_first) except ValueError: pass # pre-empted by another request else: from tgext.debugbar.controller import DebugBarController get_root_controller()._debugbar = DebugBarController() self.app_config.register_hook('after_render', self.render_bars) self.render_bars(response)
def content(self): controllers = odict() map_controllers("", get_root_controller(), controllers) return unicode_text( render( dict(controllers=controllers), tg.config["debugbar.engine"], "tgext.debugbar.sections.templates.controllers!html", ).split("\n", 1)[-1] )
def render_first(self, response): try: self._disconnect_hook('after_render', self.render_first) except ValueError: pass # pre-emptied by another request else: from tgext.debugbar.controller import DebugBarController get_root_controller()._debugbar = DebugBarController() self._register_hook('after_render', self.render_bars) self.render_bars(response)