Skip to content

Commit

Permalink
Merge pull request ipython#2932 from takluyver/get-static-files
Browse files Browse the repository at this point in the history
Simplify using notebook static files from external code
  • Loading branch information
Carreau committed Feb 15, 2013
2 parents 249cfd1 + 2d6fcf5 commit 3b5a1bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion IPython/frontend/html/notebook/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
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
#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -416,7 +419,7 @@ def _extra_static_paths_default(self):
@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."""
Expand Down

0 comments on commit 3b5a1bb

Please sign in to comment.