Merge pull request #2093 from takluyver/rm-widgets-hardcode

Remove hardcoded widgets check
This commit is contained in:
Min RK 2017-01-31 12:45:39 +01:00 committed by GitHub
commit 0eff9ef747

View File

@ -281,24 +281,6 @@ class NotebookWebApplication(web.Application):
handlers.extend(load_handlers('services.kernelspecs.handlers'))
handlers.extend(load_handlers('services.security.handlers'))
# BEGIN HARDCODED WIDGETS HACK
# TODO: Remove on notebook 5.0
widgets = None
try:
import widgetsnbextension
except:
try:
import ipywidgets as widgets
handlers.append(
(r"/nbextensions/widgets/(.*)", FileFindHandler, {
'path': widgets.find_static_assets(),
'no_cache_paths': ['/'], # don't cache anything in nbextensions
}),
)
except:
app_log.warning('Widgets are unavailable. Please install widgetsnbextension or ipywidgets 4.0')
# END HARDCODED WIDGETS HACK
handlers.append(
(r"/nbextensions/(.*)", FileFindHandler, {
'path': settings['nbextensions_path'],