|
52 | 52 | ShellHandler, NotebookRootHandler, NotebookHandler, NotebookCopyHandler,
|
53 | 53 | RSTHandler, AuthenticatedFileHandler, PrintNotebookHandler,
|
54 | 54 | MainClusterHandler, ClusterProfileHandler, ClusterActionHandler,
|
55 |
| - FileFindHandler, |
| 55 | + FileFindHandler, NotebookRedirectHandler, |
56 | 56 | )
|
57 | 57 | from .nbmanager import NotebookManager
|
58 | 58 | from .filenbmanager import FileNotebookManager
|
|
86 | 86 | _kernel_id_regex = r"(?P<kernel_id>\w+-\w+-\w+-\w+-\w+)"
|
87 | 87 | _kernel_action_regex = r"(?P<action>restart|interrupt)"
|
88 | 88 | _notebook_id_regex = r"(?P<notebook_id>\w+-\w+-\w+-\w+-\w+)"
|
| 89 | +_notebook_name_regex = r"(?P<notebook_name>.+\.ipynb)" |
89 | 90 | _profile_regex = r"(?P<profile>[^\/]+)" # there is almost no text that is invalid
|
90 | 91 | _cluster_action_regex = r"(?P<action>start|stop)"
|
91 | 92 |
|
@@ -136,6 +137,7 @@ def __init__(self, ipython_app, kernel_manager, notebook_manager,
|
136 | 137 | (r"/logout", LogoutHandler),
|
137 | 138 | (r"/new", NewHandler),
|
138 | 139 | (r"/%s" % _notebook_id_regex, NamedNotebookHandler),
|
| 140 | + (r"/%s" % _notebook_name_regex, NotebookRedirectHandler), |
139 | 141 | (r"/%s/copy" % _notebook_id_regex, NotebookCopyHandler),
|
140 | 142 | (r"/%s/print" % _notebook_id_regex, PrintNotebookHandler),
|
141 | 143 | (r"/kernels", MainKernelHandler),
|
@@ -170,6 +172,7 @@ def __init__(self, ipython_app, kernel_manager, notebook_manager,
|
170 | 172 | cookie_secret=os.urandom(1024),
|
171 | 173 | login_url=url_path_join(base_project_url,'/login'),
|
172 | 174 | cookie_name='username-%s' % uuid.uuid4(),
|
| 175 | + base_project_url = base_project_url, |
173 | 176 | )
|
174 | 177 |
|
175 | 178 | # allow custom overrides for the tornado web app.
|
|
0 commit comments