diff --git a/docs/source/extending/handlers.rst b/docs/source/extending/handlers.rst index f3bf87f270..09bfd04b25 100644 --- a/docs/source/extending/handlers.rst +++ b/docs/source/extending/handlers.rst @@ -115,7 +115,7 @@ following: Called when the extension is loaded. Args: - nb_server_app (NotebookWebApplication): handle to the Notebook webserver instance. + nb_server_app: handle to the Notebook webserver instance. """ web_app = nb_server_app.web_app host_pattern = '.*$' diff --git a/jupyter_server/serverapp.py b/jupyter_server/serverapp.py index 46e9921fe2..8895a800b9 100755 --- a/jupyter_server/serverapp.py +++ b/jupyter_server/serverapp.py @@ -1050,6 +1050,16 @@ def _update_pylab(self, change): ) self.exit(1) + notebook_dir = Unicode( + config=True, + help=_("DEPRECATED, use root_dir.") + ) + + @observe('notebook_dir') + def _update_notebook_dir(self, change): + self.log.warning(_("notebook_dir is deprecated, use root_dir")) + self.root_dir = change['new'] + root_dir = Unicode(config=True, help=_("The directory to use for notebooks and kernels.") )