From 9b945e7bc2aab9e5c5aeb944a39ffbe33a99fd78 Mon Sep 17 00:00:00 2001 From: "Brian E. Granger" Date: Sat, 10 Sep 2011 10:57:55 -0700 Subject: [PATCH] Added kill_kernel to notebook template. --- IPython/frontend/html/notebook/handlers.py | 6 ++++-- IPython/frontend/html/notebook/templates/notebook.html | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/IPython/frontend/html/notebook/handlers.py b/IPython/frontend/html/notebook/handlers.py index 5cf022c7c..e63291ce3 100644 --- a/IPython/frontend/html/notebook/handlers.py +++ b/IPython/frontend/html/notebook/handlers.py @@ -90,7 +90,8 @@ class NewHandler(AuthenticatedHandler): self.render( 'notebook.html', project=project, notebook_id=notebook_id, - base_project_url=u'/', base_kernel_url=u'/' + base_project_url=u'/', base_kernel_url=u'/', + kill_kernel=False ) @@ -105,7 +106,8 @@ class NamedNotebookHandler(AuthenticatedHandler): self.render( 'notebook.html', project=project, notebook_id=notebook_id, - base_project_url=u'/', base_kernel_url=u'/' + base_project_url=u'/', base_kernel_url=u'/', + kill_kernel=False ) diff --git a/IPython/frontend/html/notebook/templates/notebook.html b/IPython/frontend/html/notebook/templates/notebook.html index 75afd7b75..f96e79bb5 100644 --- a/IPython/frontend/html/notebook/templates/notebook.html +++ b/IPython/frontend/html/notebook/templates/notebook.html @@ -191,7 +191,11 @@
- + {% if kill_kernel %} + + {% else %} + + {% end %} Kill kernel upon exit: