mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
Merge pull request #310 from minrk/singleuser-notebook
single-user imports notebook package directly
This commit is contained in:
@@ -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'):
|
||||||
import IPython
|
|
||||||
if V(IPython.__version__) < V('3.0'):
|
|
||||||
raise ImportError("JupyterHub Requires IPython >= 3.0, found %s" % IPython.__version__)
|
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
|
||||||
|
|
||||||
|
|
||||||
# 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.
|
||||||
|
Reference in New Issue
Block a user