From 3b5a1bb39ea6817d65979b8ccc9ab609c97a921f 2013-02-15 07:54:24 From: Bussonnier Matthias <bussonniermatthias@gmail.com> Date: 2013-02-15 07:54:24 Subject: [PATCH] Merge pull request #2932 from takluyver/get-static-files Simplify using notebook static files from external code --- diff --git a/IPython/frontend/html/notebook/notebookapp.py b/IPython/frontend/html/notebook/notebookapp.py index 7dffa2e..f8708ac 100644 --- a/IPython/frontend/html/notebook/notebookapp.py +++ b/IPython/frontend/html/notebook/notebookapp.py @@ -96,6 +96,9 @@ ipython notebook --certfile=mycert.pem # use SSL/TLS certificate ipython notebook --port=5555 --ip=* # Listen on port 5555, all interfaces """ +# Packagers: modify this line if you store the notebook static files elsewhere +DEFAULT_STATIC_FILES_PATH = os.path.join(os.path.dirname(__file__), "static") + #----------------------------------------------------------------------------- # Helper functions #----------------------------------------------------------------------------- @@ -416,7 +419,7 @@ class NotebookApp(BaseIPythonApplication): @property def static_file_path(self): """return extra paths + the default location""" - return self.extra_static_paths + [os.path.join(os.path.dirname(__file__), "static")] + return self.extra_static_paths + [DEFAULT_STATIC_FILES_PATH] mathjax_url = Unicode("", config=True, help="""The url for MathJax.js."""