##// END OF EJS Templates
this is how the configuration system is supposed to be used.
Timo Paulssen -
Show More
@@ -89,11 +89,7 b' ipython notebook --port=5555 --ip=* # Listen on port 5555, all interfaces'
89
89
90 class NotebookWebApplication(web.Application):
90 class NotebookWebApplication(web.Application):
91
91
92 settings = Dict(config=True,
92 def __init__(self, ipython_app, kernel_manager, notebook_manager, log, settings_overrides):
93 help="Supply overrides for the tornado.web.Application, that the "
94 "IPython notebook uses.")
95
96 def __init__(self, ipython_app, kernel_manager, notebook_manager, log):
97 handlers = [
93 handlers = [
98 (r"/", ProjectDashboardHandler),
94 (r"/", ProjectDashboardHandler),
99 (r"/login", LoginHandler),
95 (r"/login", LoginHandler),
@@ -117,9 +113,9 b' class NotebookWebApplication(web.Application):'
117 )
113 )
118
114
119 # allow custom overrides for the tornado web app.
115 # allow custom overrides for the tornado web app.
120 settings.update(self.settings)
116 settings.update(settings_overrides)
121
117
122 super(NotebookWebApplication, self).__init__(self, handlers, **settings)
118 super(NotebookWebApplication, self).__init__(handlers, **settings)
123
119
124 self.kernel_manager = kernel_manager
120 self.kernel_manager = kernel_manager
125 self.log = log
121 self.log = log
@@ -251,6 +247,10 b' class NotebookApp(BaseIPythonApplication):'
251 help="Whether to prevent editing/execution of notebooks."
247 help="Whether to prevent editing/execution of notebooks."
252 )
248 )
253
249
250 webapp_settings = Dict(config=True,
251 help="Supply overrides for the tornado.web.Application that the "
252 "IPython notebook uses.")
253
254 enable_mathjax = Bool(True, config=True,
254 enable_mathjax = Bool(True, config=True,
255 help="""Whether to enable MathJax for typesetting math/TeX
255 help="""Whether to enable MathJax for typesetting math/TeX
256
256
@@ -323,7 +323,8 b' class NotebookApp(BaseIPythonApplication):'
323 super(NotebookApp, self).initialize(argv)
323 super(NotebookApp, self).initialize(argv)
324 self.init_configurables()
324 self.init_configurables()
325 self.web_app = NotebookWebApplication(
325 self.web_app = NotebookWebApplication(
326 self, self.kernel_manager, self.notebook_manager, self.log
326 self, self.kernel_manager, self.notebook_manager, self.log,
327 self.webapp_settings
327 )
328 )
328 if self.certfile:
329 if self.certfile:
329 ssl_options = dict(certfile=self.certfile)
330 ssl_options = dict(certfile=self.certfile)
General Comments 0
You need to be logged in to leave comments. Login now