Update to point to widgetsnbextension

This commit is contained in:
Jonathan Frederic 2016-02-01 08:19:05 -08:00
parent 9a3cb11c4e
commit 2ab768b71b
2 changed files with 4 additions and 4 deletions

View File

@ -241,12 +241,12 @@ class NotebookWebApplication(web.Application):
# BEGIN HARDCODED WIDGETS HACK
widgets = None
try:
widgets = __import__('jupyter-js-widgets-nbextension')
import widgetsnbextension as widgets
except:
try:
widgets = __import__('ipywidgets')
import ipywidgets as widgets
except:
app_log.warning('Widgets are unavailable. Please install jupyter-js-widgets-nbextension or ipywidgets 4.0')
app_log.warning('Widgets are unavailable. Please install widgetsnbextension or ipywidgets 4.0')
if widgets is not None:
handlers.append(
(r"/nbextensions/widgets/(.*)", FileFindHandler, {

View File

@ -59,7 +59,7 @@ require([
utils.load_extension('widgets/extension').catch(function () {
// Fallback to the ipywidgets extension
utils.load_extension('widgets/notebook/js/extension').catch(function () {
console.warn('ipywidgets package not installed. Widgets are not available.');
console.warn('Widgets are not available. Please install widgetsnbextension or ipywidgets 4.0');
});
});
// END HARDCODED WIDGETS HACK