diff --git a/moksha/controllers/root.py b/moksha/controllers/root.py index f39b195..23e13c0 100644 --- a/moksha/controllers/root.py +++ b/moksha/controllers/root.py @@ -27,7 +27,7 @@ from tg.decorators import after_render from repoze.what import predicates from pkg_resources import resource_filename -#from widgetbrowser import WidgetBrowser +from widgetbrowser import WidgetBrowser from pylons.i18n import ugettext as _, lazy_ugettext as l_ from moksha import _ @@ -51,7 +51,6 @@ class RootController(BaseController): moksha_admin = SecureController() # ToscaWidgets WidgetBrowser integration - """ docs = WSGIAppController( WidgetBrowser( template_dirs=[ @@ -59,7 +58,6 @@ class RootController(BaseController): docs_dir=config.get('docs_dir', 'docs'), full_stack=False, interactive=False)) - """ #@after_render(cache_rendered_data) @expose('mako:moksha.templates.index') diff --git a/moksha/lib/base.py b/moksha/lib/base.py index c9c7a4f..37b67cb 100644 --- a/moksha/lib/base.py +++ b/moksha/lib/base.py @@ -66,6 +66,7 @@ class BaseController(TGController): # This is normally done when the widget is rendered, but we cannot # assume that moksha apps are going to be using our master index # template, which renders this widget for us. - global_resources.register_resources() + if not environ['PATH_INFO'].startswith(url('/docs')): + global_resources.register_resources() return TGController.__call__(self, environ, start_response)