Update the notebook widget hack to reference the new jupyter-js-widgets-nbextension package

This commit is contained in:
Jonathan Frederic 2016-01-28 13:08:56 -08:00
parent de09a93555
commit e7bc3fcda6
2 changed files with 4 additions and 4 deletions

View File

@ -240,15 +240,15 @@ class NotebookWebApplication(web.Application):
# BEGIN HARDCODED WIDGETS HACK
try:
import ipywidgets
widgets = __import__('jupyter-js-widgets-nbextension')
handlers.append(
(r"/nbextensions/widgets/(.*)", FileFindHandler, {
'path': ipywidgets.find_static_assets(),
'path': widgets.find_static_assets(),
'no_cache_paths': ['/'], # don't cache anything in nbextensions
}),
)
except:
app_log.warning('ipywidgets package not installed. Widgets are unavailable.')
app_log.warning('jupyter-js-widgets-nbextension package not installed. Widgets are unavailable.')
# END HARDCODED WIDGETS HACK
handlers.append(

View File

@ -55,7 +55,7 @@ require([
"use strict";
// BEGIN HARDCODED WIDGETS HACK
utils.load_extension('widgets/notebook/js/extension').catch(function () {
utils.load_extension('widgets/extension').catch(function () {
console.warn('ipywidgets package not installed. Widgets are not available.');
});
// END HARDCODED WIDGETS HACK