<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Le 20 sept. 2013 à 02:14, Stephen Chan a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div> This seems like it should be easy, but I just don't know the right<br>path through the API and I haven't been having much look googling for<br>it.<br><br> In the notebook.html template, Javascript includes are wrapped by<br>static_url().<br><br> If I have code that generates HTML for display in an output cell,<br>and I want to include JS files from under the static JS directories.<br>It looks like it is in settings.static_url_prefix but don't seem to be<br>able to<br><br> It doesn't show up in the dictionary that get_ipython().config returns.<br></div></blockquote><div><br></div><div>$('body').data('baseProjectUrl')</div><div><br></div><div>?</div><div><br></div><div>I would suggest using require.js (<a href="http://requirejs.org/">http://requirejs.org/</a>) </div><div>That is smart enough to know it's own location so that you can load relative url. </div><div>And also will do all the caching for you if it is needed… help with dependencies… etc</div><div><br></div><div>-- </div><div>M</div></div><br></body></html>