mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-09 03:50:45 +08:00
Merge pull request #2093 from takluyver/rm-widgets-hardcode
Remove hardcoded widgets check
This commit is contained in:
commit
0eff9ef747
@ -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'],
|
||||
|
Loading…
Reference in New Issue
Block a user