Merge pull request #310 from minrk/singleuser-notebook

single-user imports notebook package directly
This commit is contained in:
Min RK
2015-10-06 14:08:35 +02:00

View File

@@ -24,18 +24,28 @@ from IPython.utils.traitlets import (
CUnicode, CUnicode,
) )
from IPython.html.notebookapp import NotebookApp, aliases as notebook_aliases try:
from IPython.html.auth.login import LoginHandler import notebook
from IPython.html.auth.logout import LogoutHandler # 4.x
except ImportError:
from IPython.html.notebookapp import NotebookApp, aliases as notebook_aliases
from IPython.html.auth.login import LoginHandler
from IPython.html.auth.logout import LogoutHandler
from IPython.html.utils import url_path_join from IPython.html.utils import url_path_join
from distutils.version import LooseVersion as V
from distutils.version import LooseVersion as V import IPython
if V(IPython.__version__) < V('3.0'):
raise ImportError("JupyterHub Requires IPython >= 3.0, found %s" % IPython.__version__)
else:
from notebook.notebookapp import NotebookApp, aliases as notebook_aliases
from notebook.auth.login import LoginHandler
from notebook.auth.logout import LogoutHandler
from notebook.utils import url_path_join
import IPython
if V(IPython.__version__) < V('3.0'):
raise ImportError("JupyterHub Requires IPython >= 3.0, found %s" % IPython.__version__)
# Define two methods to attach to AuthenticatedHandler, # Define two methods to attach to AuthenticatedHandler,
# which authenticate via the central auth server. # which authenticate via the central auth server.