diff --git a/IPython/frontend/html/notebook/handlers.py b/IPython/frontend/html/notebook/handlers.py index f109469..bf5a2ec 100644 --- a/IPython/frontend/html/notebook/handlers.py +++ b/IPython/frontend/html/notebook/handlers.py @@ -61,8 +61,10 @@ class NBBrowserHandler(AuthenticatedHandler): def get(self): nbm = self.application.notebook_manager project = nbm.notebook_dir - self.render('nbbrowser.html', project=project, - base_project_url=u'/', base_kernel_url=u'/') + self.render( + 'nbbrowser.html', project=project, + base_project_url=u'/', base_kernel_url=u'/' + ) class LoginHandler(AuthenticatedHandler): @@ -82,9 +84,14 @@ class NewHandler(AuthenticatedHandler): @web.authenticated def get(self): - notebook_id = self.application.notebook_manager.new_notebook() - self.render('notebook.html', notebook_id=notebook_id, - base_project_url=u'/', base_kernel_url=u'/') + nbm = self.application.notebook_manager + project = nbm.notebook_dir + notebook_id = nbm.new_notebook() + self.render( + 'notebook.html', project=project, + notebook_id=notebook_id, + base_project_url=u'/', base_kernel_url=u'/' + ) class NamedNotebookHandler(AuthenticatedHandler): @@ -92,10 +99,14 @@ class NamedNotebookHandler(AuthenticatedHandler): @web.authenticated def get(self, notebook_id): nbm = self.application.notebook_manager + project = nbm.notebook_dir if not nbm.notebook_exists(notebook_id): raise web.HTTPError(404, u'Notebook does not exist: %s' % notebook_id) - self.render('notebook.html', notebook_id=notebook_id, - base_project_url=u'/', base_kernel_url=u'/') + self.render( + 'notebook.html', project=project, + notebook_id=notebook_id, + base_project_url=u'/', base_kernel_url=u'/' + ) #----------------------------------------------------------------------------- diff --git a/IPython/frontend/html/notebook/templates/nbbrowser.html b/IPython/frontend/html/notebook/templates/nbbrowser.html index 35eb123..ceeab4f 100644 --- a/IPython/frontend/html/notebook/templates/nbbrowser.html +++ b/IPython/frontend/html/notebook/templates/nbbrowser.html @@ -14,7 +14,8 @@ - +