Skip to content
Browse files

Misc changes to the notebook.

* IPythonNotebookApp->NotebookApp.
* Cleaned up html templates of unused stylesheets.
  • Loading branch information...
1 parent ddfe765 commit e64adb9b28fcb989044eaa77cea6ef94e9d3ea82 @ellisonbg ellisonbg committed with Sep 6, 2011
View
6 IPython/core/profileapp.py
@@ -194,15 +194,15 @@ def init_config_files(self):
else:
apps.append(IPythonQtConsoleApp)
try:
- from IPython.frontend.html.notebook.notebookapp import IPythonNotebookApp
+ from IPython.frontend.html.notebook.notebookapp import NotebookApp
except ImportError:
pass
except Exception:
- self.log.debug('Unexpected error when importing IPythonNotebookApp',
+ self.log.debug('Unexpected error when importing NotebookApp',
exc_info=True
)
else:
- apps.append(IPythonNotebookApp)
+ apps.append(NotebookApp)
if self.parallel:
from IPython.parallel.apps.ipcontrollerapp import IPControllerApp
from IPython.parallel.apps.ipengineapp import IPEngineApp
View
22 IPython/frontend/html/notebook/notebookapp.py
@@ -125,11 +125,11 @@ def __init__(self, ipython_app, kernel_manager, notebook_manager, log):
aliases = dict(ipkernel_aliases)
aliases.update({
- 'ip': 'IPythonNotebookApp.ip',
- 'port': 'IPythonNotebookApp.port',
- 'keyfile': 'IPythonNotebookApp.keyfile',
- 'certfile': 'IPythonNotebookApp.certfile',
- 'ws-hostname': 'IPythonNotebookApp.ws_hostname',
+ 'ip': 'NotebookApp.ip',
+ 'port': 'NotebookApp.port',
+ 'keyfile': 'NotebookApp.keyfile',
+ 'certfile': 'NotebookApp.certfile',
+ 'ws-hostname': 'NotebookApp.ws_hostname',
'notebook-dir': 'NotebookManager.notebook_dir',
})
@@ -141,10 +141,10 @@ def __init__(self, ipython_app, kernel_manager, notebook_manager, log):
u'notebook-dir']
#-----------------------------------------------------------------------------
-# IPythonNotebookApp
+# NotebookApp
#-----------------------------------------------------------------------------
-class IPythonNotebookApp(BaseIPythonApplication):
+class NotebookApp(BaseIPythonApplication):
name = 'ipython-notebook'
default_config_file_name='ipython_notebook_config.py'
@@ -213,7 +213,7 @@ def get_ws_url(self):
return prefix + self.ws_hostname + u':' + unicode(self.port)
def parse_command_line(self, argv=None):
- super(IPythonNotebookApp, self).parse_command_line(argv)
+ super(NotebookApp, self).parse_command_line(argv)
if argv is None:
argv = sys.argv[1:]
@@ -254,14 +254,14 @@ def init_configurables(self):
self.notebook_manager.list_notebooks()
def init_logging(self):
- super(IPythonNotebookApp, self).init_logging()
+ super(NotebookApp, self).init_logging()
# This prevents double log messages because tornado use a root logger that
# self.log is a child of. The logging module dipatches log messages to a log
# and all of its ancenstors until propagate is set to False.
self.log.propagate = False
def initialize(self, argv=None):
- super(IPythonNotebookApp, self).initialize(argv)
+ super(NotebookApp, self).initialize(argv)
self.init_configurables()
self.web_app = NotebookWebApplication(
self, self.kernel_manager, self.notebook_manager, self.log
@@ -309,7 +309,7 @@ def start(self):
#-----------------------------------------------------------------------------
def launch_new_instance():
- app = IPythonNotebookApp()
+ app = NotebookApp()
app.initialize()
app.start()
View
2 IPython/frontend/html/notebook/static/js/savewidget.js
@@ -82,7 +82,7 @@ var IPython = (function (IPython) {
SaveWidget.prototype.set_document_title = function () {
nbname = this.get_notebook_name();
- document.title = 'IPy: ' + nbname;
+ document.title = nbname;
};
View
21 IPython/frontend/html/notebook/templates/login.html
@@ -7,21 +7,18 @@
<title>IPython Notebook</title>
<link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
-<!-- <link rel="stylesheet" href="static/jquery/css/themes/rocket/jquery-wijmo.css" type="text/css" /> -->
-<!-- <link rel="stylesheet" href="static/jquery/css/themes/smoothness/jquery-ui-1.8.14.custom.css" type="text/css" />-->
-
<link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" />
<link rel="stylesheet" href="static/css/layout.css" type="text/css" />
<link rel="stylesheet" href="static/css/base.css" type="text/css" />
-<script type="text/javascript" charset="utf-8">
-function add_next_to_action(){
- // add 'next' argument to action url, to preserve redirect
- var query = location.search.substring(1);
- var form = document.forms[0];
- var action = form.getAttribute("action");
- form.setAttribute("action", action + '?' + query);
-}
-</script>
+ <script type="text/javascript" charset="utf-8">
+ function add_next_to_action(){
+ // add 'next' argument to action url, to preserve redirect
+ var query = location.search.substring(1);
+ var form = document.forms[0];
+ var action = form.getAttribute("action");
+ form.setAttribute("action", action + '?' + query);
+ }
+ </script>
</head>
<body onload="add_next_to_action()">
View
3 IPython/frontend/html/notebook/templates/nbbrowser.html
@@ -7,9 +7,6 @@
<title>IPython Notebook</title>
<link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
-<!-- <link rel="stylesheet" href="static/jquery/css/themes/rocket/jquery-wijmo.css" type="text/css" /> -->
-<!-- <link rel="stylesheet" href="static/jquery/css/themes/smoothness/jquery-ui-1.8.14.custom.css" type="text/css" />-->
-
<link rel="stylesheet" href="static/css/boilerplate.css" type="text/css" />
<link rel="stylesheet" href="static/css/layout.css" type="text/css" />
<link rel="stylesheet" href="static/css/base.css" type="text/css" />
View
5 IPython/frontend/html/notebook/templates/notebook.html
@@ -6,10 +6,6 @@
<title>IPython Notebook</title>
- <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
-<!-- <link rel="stylesheet" href="static/jquery/css/themes/rocket/jquery-wijmo.css" type="text/css" /> -->
-<!-- <link rel="stylesheet" href="static/jquery/css/themes/smoothness/jquery-ui-1.8.14.custom.css" type="text/css" />-->
-
<!-- <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML" charset="utf-8"></script> -->
<script type='text/javascript' src='static/mathjax/MathJax.js?config=TeX-AMS_HTML' charset='utf-8'></script>
<script type="text/javascript">
@@ -30,6 +26,7 @@
}
</script>
+ <link rel="stylesheet" href="static/jquery/css/themes/aristo/jquery-wijmo.css" type="text/css" />
<link rel="stylesheet" href="static/codemirror/lib/codemirror.css">
<link rel="stylesheet" href="static/codemirror/mode/markdown/markdown.css">
<link rel="stylesheet" href="static/codemirror/mode/rst/rst.css">
View
2 IPython/frontend/terminal/ipapp.py
@@ -206,7 +206,7 @@ def _classes_default(self):
qtconsole=('IPython.frontend.qt.console.qtconsoleapp.IPythonQtConsoleApp',
"""Launch the IPython Qt Console."""
),
- notebook=('IPython.frontend.html.notebook.notebookapp.IPythonNotebookApp',
+ notebook=('IPython.frontend.html.notebook.notebookapp.NotebookApp',
"""Launch the IPython HTML Notebook Server"""
),
profile = ("IPython.core.profileapp.ProfileApp",

0 comments on commit e64adb9

Please sign in to comment.
Something went wrong with that request. Please try again.