mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-15 04:00:34 +08:00
Update the notebook widget hack to reference the new jupyter-js-widgets-nbextension package
This commit is contained in:
parent
de09a93555
commit
e7bc3fcda6
@ -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(
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user