##// END OF EJS Templates
add extra_config_file...
add extra_config_file and `--config` alias for loading a single extra config file, e.g. ipython notebook --config mycfg.py which will be strictly in addition to, and at higher priority than, existing config files, profiles, etc. Note that the loading code hasn't changed, it's just indented to put it in a for-loop.

File last commit:

r11033:fa36e98f
r11277:aefd558a
Show More
logout.py
43 lines | 1.4 KiB | text/x-python | PythonLexer
Brian E. Granger
Splitting handlers into different files....
r10642 """Tornado handlers for logging out of the notebook.
Brian E. Granger
Adding new files.
r10641
Authors:
* Brian Granger
"""
#-----------------------------------------------------------------------------
Brian E. Granger
Splitting handlers into different files....
r10642 # Copyright (C) 2011 The IPython Development Team
Brian E. Granger
Adding new files.
r10641 #
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
Brian E. Granger
Updating import statements after moving notebook files around.
r10649 from ..base.handlers import IPythonHandler
Brian E. Granger
Adding new files.
r10641
#-----------------------------------------------------------------------------
Brian E. Granger
Splitting handlers into different files....
r10642 # Handler
Brian E. Granger
Adding new files.
r10641 #-----------------------------------------------------------------------------
class LogoutHandler(IPythonHandler):
def get(self):
self.clear_login_cookie()
if self.login_available:
message = {'info': 'Successfully logged out.'}
else:
message = {'warning': 'Cannot log out. Notebook authentication '
'is disabled.'}
self.write(self.render_template('logout.html',
message=message))
Brian E. Granger
More work on the handlers
r10647
#-----------------------------------------------------------------------------
# URL to handler mappings
#-----------------------------------------------------------------------------
default_handlers = [(r"/logout", LogoutHandler)]