mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Use baseProjectUrl for widget import path
This commit is contained in:
parent
f95d6168ae
commit
12b02b3e49
@ -35,8 +35,8 @@ def init_widget_js():
|
||||
name = filename.rsplit('.', 1)[0]
|
||||
if not (name == 'widget' or name == '__init__') and name.startswith('widget_'):
|
||||
# Remove 'widget_' from the start of the name before compiling the path.
|
||||
js_path = '../static/notebook/js/widgets/%s.js' % name[7:]
|
||||
display(Javascript(data='$.getScript("%s");' % js_path), exclude="text/plain")
|
||||
js_path = 'static/notebook/js/widgets/%s.js' % name[7:]
|
||||
display(Javascript(data='$.getScript($("body").data("baseProjectUrl") + "%s");' % js_path), exclude="text/plain")
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user