Skip to content

Commit

Permalink
Fix opening files from the CLI (#6946)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpio authored Jun 26, 2023
1 parent 7f1a2f4 commit 27c00bc
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions notebook/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class JupyterNotebookApp(NotebookConfigShimMixin, LabServerApp):
app_version = version
extension_url = "/"
default_url = Unicode("/tree", config=True, help="The default URL to redirect to from `/`")
file_url_prefix = "/notebooks"
file_url_prefix = "/tree"
load_other_extensions = True
app_dir = app_dir
subcommands: dict = {}
Expand Down Expand Up @@ -329,13 +329,6 @@ def initialize_handlers(self):
# if the serverapp set one
page_config["token"] = ""

self.handlers.append(
(
rf"/{self.file_url_prefix}/((?!.*\.ipynb($|\?)).*)",
web.RedirectHandler,
{"url": ujoin(self.serverapp.base_url, "/edit/{0}")},
)
)
self.handlers.append(("/?", RedirectHandler))
self.handlers.append(("/tree(.*)", TreeHandler))
self.handlers.append(("/notebooks(.*)", NotebookHandler))
Expand Down

0 comments on commit 27c00bc

Please sign in to comment.