[IPython-User] extra_static_paths configuration does not include profile default
Matthew Brett
matthew.brett@gmail....
Thu Feb 28 21:42:19 CST 2013
Hi,
I am ashamed to say how long I struggled with this, but I got
significantly confused by the behavior of the ``extra_static_paths``
configuration option in the notebook.
# This allows adding javascript/css to be available from the notebook server
# machine, or overriding individual files in the IPython
# c.NotebookApp.extra_static_paths = []
By default, this variable is not in fact set to empty, but to the
single entry of the 'static' directory in the current profile:
https://github.com/ipython/ipython/blob/master/IPython/frontend/html/notebook/notebookapp.py#L416
So, it took me a while to realize that, if I wanted to set
``extra_static_paths``, I had to add back the profile ``static``
directory:
https://github.com/matthew-brett/ipython-static-profiles/blob/extend-readme/README.md
This is because I wanted to load the ``custom.js`` file in
``<profile>/static/js``.
Maybe it would be sensible to add the <profile>/static directory to
``extra_static_paths`` after loading the config, and therefore
unconditionally? Or at least note its lack for an empty list in the
ipython_notebook_config.py file comments?
Cheers,
Matthew
More information about the IPython-User
mailing list