use new assumptions for named_notebook_path

pull/37/head
Paul Ivanov 13 years ago committed by MinRK
parent 7ca8a21bf6
commit f42de98c5b

@ -18,7 +18,6 @@ Authors:
from tornado import web
from ..base.handlers import IPythonHandler
from urllib import quote, unquote
#-----------------------------------------------------------------------------
# Handlers
@ -43,15 +42,16 @@ class ProjectPathDashboardHandler(IPythonHandler):
nbm = self.notebook_manager
name, path = nbm.named_notebook_path(notebook_path)
if name != None:
self.redirect(self.base_project_url + 'notebooks/' + notebook_path)
# ends with .ipynb
self.redirect(self.base_project_url + 'notebooks' + path + name)
else:
project = self.project + path
path = nbm.url_encode(path)
project = self.project + '/' + notebook_path
self.write(self.render_template('tree.html',
project=project,
project_component=project.split('/'),
notebook_path=path,
notebook_name=name))
notebook_name=name))
class TreeRedirectHandler(IPythonHandler):

Loading…
Cancel
Save