Show More
@@ -3,8 +3,22 b'' | |||||
3 | import os |
|
3 | import os | |
4 | # Packagers: modify this line if you store the notebook static files elsewhere |
|
4 | # Packagers: modify this line if you store the notebook static files elsewhere | |
5 | DEFAULT_STATIC_FILES_PATH = os.path.join(os.path.dirname(__file__), "static") |
|
5 | DEFAULT_STATIC_FILES_PATH = os.path.join(os.path.dirname(__file__), "static") | |
6 | # Packagers: modify this line if you store the notebook template files elsewhere |
|
6 | ||
7 | DEFAULT_TEMPLATE_FILES_PATH = os.path.join(os.path.dirname(__file__), "templates") |
|
7 | # Packagers: modify the next line if you store the notebook template files | |
|
8 | # elsewhere | |||
|
9 | ||||
|
10 | # Include both IPython/html/ and IPython/html/templates/. This makes it | |||
|
11 | # possible for users to override a template with a file that inherits from that | |||
|
12 | # template. | |||
|
13 | # | |||
|
14 | # For example, if you want to override a specific block of notebook.html, you | |||
|
15 | # can create a file called notebook.html that inherits from from | |||
|
16 | # templates/notebook.html, and the latter will resolve correctly to the base | |||
|
17 | # implementation. | |||
|
18 | DEFAULT_TEMPLATE_PATH_LIST = [ | |||
|
19 | os.path.dirname(__file__), | |||
|
20 | os.path.join(os.path.dirname(__file__), "templates"), | |||
|
21 | ] | |||
8 |
|
22 | |||
9 | del os |
|
23 | del os | |
10 |
|
24 |
@@ -53,7 +53,7 b' from tornado.log import LogFormatter, app_log, access_log, gen_log' | |||||
53 |
|
53 | |||
54 | from IPython.html import ( |
|
54 | from IPython.html import ( | |
55 | DEFAULT_STATIC_FILES_PATH, |
|
55 | DEFAULT_STATIC_FILES_PATH, | |
56 |
DEFAULT_TEMPLATE_ |
|
56 | DEFAULT_TEMPLATE_PATH_LIST, | |
57 | ) |
|
57 | ) | |
58 | from .base.handlers import Template404 |
|
58 | from .base.handlers import Template404 | |
59 | from .log import log_request |
|
59 | from .log import log_request | |
@@ -536,8 +536,8 b' class NotebookApp(BaseIPythonApplication):' | |||||
536 |
|
536 | |||
537 | @property |
|
537 | @property | |
538 | def template_file_path(self): |
|
538 | def template_file_path(self): | |
539 | """return extra paths + the default location""" |
|
539 | """return extra paths + the default locations""" | |
540 |
return self.extra_template_paths + |
|
540 | return self.extra_template_paths + DEFAULT_TEMPLATE_PATH_LIST | |
541 |
|
541 | |||
542 | nbextensions_path = List(Unicode, config=True, |
|
542 | nbextensions_path = List(Unicode, config=True, | |
543 | help="""paths for Javascript extensions. By default, this is just IPYTHONDIR/nbextensions""" |
|
543 | help="""paths for Javascript extensions. By default, this is just IPYTHONDIR/nbextensions""" |
General Comments 0
You need to be logged in to leave comments.
Login now