Skip to content

Commit 7e55b21

Browse files
authored
Add a redirect from /nbclassic to /nbclassic/tree if both notebook>=7 if both notebook>=7 and nbclassic are installed (#166)
* Add a redirect from /nbclassic to /nbclassic/tree if both notebook>=7 and nbclassic are installed * use nbclassic_path
1 parent 04169e2 commit 7e55b21

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Diff for: nbclassic/notebookapp.py

+10
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,16 @@ def initialize_handlers(self):
274274
{"url": self.serverapp.base_url+"files/{0}"}
275275
)
276276
)
277+
# Add a redirect from /nbclassic to /nbclassic/tree
278+
# if both notebook>=7 and nbclassic are installed.
279+
if len(nbclassic_path()) > 0:
280+
handlers.append(
281+
(
282+
rf"/nbclassic",
283+
RedirectHandler,
284+
{"url": self.serverapp.base_url+"nbclassic/tree"}
285+
)
286+
)
277287

278288
# load extra services specified by users before default handlers
279289
for service in self.settings['extra_services']:

Diff for: nbclassic/static/base/js/namespace.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ define(function(){
7373
// tree
7474
jglobal('SessionList','tree/js/sessionlist');
7575

76-
Jupyter.version = "0.4.6";
76+
Jupyter.version = "0.5.0.dev0";
7777
Jupyter._target = '_blank';
7878

7979
return Jupyter;

0 commit comments

Comments
 (0)