nbclassic extension name has been renamed

our patches to the jinja env need updating to find the new env
This commit is contained in:
Min RK
2022-07-11 20:37:29 -07:00
parent 71e06a4cd7
commit c8a8892292

View File

@@ -749,10 +749,12 @@ class SingleUserNotebookAppMixin(Configurable):
if 'jinja2_env' in settings:
# default jinja env (should we do this on jupyter-server, or only notebook?)
jinja_envs.append(settings['jinja2_env'])
if 'notebook_jinja2_env' in settings:
# when running with jupyter-server, classic notebook (nbclassic server extension)
# gets its own jinja env, which needs the same patch
jinja_envs.append(settings['notebook_jinja2_env'])
for ext_name in ("notebook", "nbclassic"):
env_name = f"{ext_name}_jinja2_env"
if env_name in settings:
# when running with jupyter-server, classic notebook (nbclassic server extension or notebook v7)
# gets its own jinja env, which needs the same patch
jinja_envs.append(settings['notebook_jinja2_env'])
# patch jinja env loading to get modified template, only for base page.html
def get_page(name):