From bc1ac445d6e3c236272c80422ea541d85607fb18 2014-01-16 10:56:04 From: Jonathan Frederic Date: 2014-01-16 10:56:04 Subject: [PATCH] Use baseProjectUrl for widget import path --- diff --git a/IPython/html/widgets/widget.py b/IPython/html/widgets/widget.py index e929575..88b203e 100644 --- a/IPython/html/widgets/widget.py +++ b/IPython/html/widgets/widget.py @@ -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") #-----------------------------------------------------------------------------