mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-15 04:00:34 +08:00
Update to point to widgetsnbextension
This commit is contained in:
parent
9a3cb11c4e
commit
2ab768b71b
@ -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, {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user