Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix loading of static and template path config #192

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions nbclassic/notebookapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,6 @@ def _default_static_custom_path(self):
DEFAULT_STATIC_FILES_PATH)
]

@property
def template_file_path(self):
"""return extra paths + the default locations"""
return self.extra_template_paths + DEFAULT_TEMPLATE_PATH_LIST

extra_nbextensions_path = List(Unicode(), config=True,
help=_i18n(
"""extra paths to look for Javascript notebook extensions""")
Expand All @@ -169,21 +164,15 @@ def nbextensions_path(self):
path = self.extra_nbextensions_path + jupyter_path('nbextensions')
return path

# Local path to static files directory.
static_paths = [DEFAULT_STATIC_FILES_PATH]

# Local path to templates directory.
template_paths = DEFAULT_TEMPLATE_PATH_LIST

@property
def static_paths(self):
"""Rename trait in jupyter_server."""
return [DEFAULT_STATIC_FILES_PATH]
return self.extra_static_paths + [DEFAULT_STATIC_FILES_PATH]

@property
def template_paths(self):
"""Rename trait for Jupyter Server."""
return DEFAULT_TEMPLATE_PATH_LIST
return self.extra_template_paths + DEFAULT_TEMPLATE_PATH_LIST

def _prepare_templates(self):
super(NotebookApp, self)._prepare_templates()
Expand Down