##// END OF EJS Templates
Updating import statements after moving notebook files around.
Brian E. Granger -
Show More
@@ -22,7 +22,7 b' from tornado.escape import url_escape'
22
22
23 from IPython.lib.security import passwd_check
23 from IPython.lib.security import passwd_check
24
24
25 from .base import IPythonHandler
25 from ..base.handlers import IPythonHandler
26
26
27 #-----------------------------------------------------------------------------
27 #-----------------------------------------------------------------------------
28 # Handler
28 # Handler
@@ -16,7 +16,7 b' Authors:'
16 # Imports
16 # Imports
17 #-----------------------------------------------------------------------------
17 #-----------------------------------------------------------------------------
18
18
19 from .base import IPythonHandler
19 from ..base.handlers import IPythonHandler
20
20
21 #-----------------------------------------------------------------------------
21 #-----------------------------------------------------------------------------
22 # Handler
22 # Handler
@@ -20,7 +20,7 b' from tornado import web'
20
20
21 from zmq.utils import jsonapi
21 from zmq.utils import jsonapi
22
22
23 from .base import IPythonHandler
23 from ..base.handlers import IPythonHandler
24
24
25 #-----------------------------------------------------------------------------
25 #-----------------------------------------------------------------------------
26 # Cluster handlers
26 # Cluster handlers
@@ -27,7 +27,7 b' from IPython.kernel.zmq.session import Session'
27 from IPython.utils.jsonutil import date_default
27 from IPython.utils.jsonutil import date_default
28 from IPython.utils.py3compat import PY3
28 from IPython.utils.py3compat import PY3
29
29
30 from .base import IPythonHandler
30 from ..base.handlers import IPythonHandler
31
31
32 #-----------------------------------------------------------------------------
32 #-----------------------------------------------------------------------------
33 # Kernel handlers
33 # Kernel handlers
@@ -62,33 +62,14 b' from tornado import web'
62
62
63 # Our own libraries
63 # Our own libraries
64 from IPython.frontend.html.notebook import DEFAULT_STATIC_FILES_PATH
64 from IPython.frontend.html.notebook import DEFAULT_STATIC_FILES_PATH
65 from .kernelmanager import MappingKernelManager
66
65
67 from .handlers.clustersapi import (
66 from .kernels.kernelmanager import MappingKernelManager
68 MainClusterHandler, ClusterProfileHandler, ClusterActionHandler
67 from .notebooks.nbmanager import NotebookManager
69 )
68 from .notebooks.filenbmanager import FileNotebookManager
70 from .handlers.kernelsapi import (
69 from .clusters.clustermanager import ClusterManager
71 MainKernelHandler, KernelHandler, KernelActionHandler,
72 IOPubHandler, StdinHandler, ShellHandler
73 )
74 from .handlers.notebooksapi import (
75 NotebookRootHandler, NotebookHandler,
76 NotebookCheckpointsHandler, ModifyNotebookCheckpointsHandler
77 )
78 from .handlers.tree import ProjectDashboardHandler
79 from .handlers.login import LoginHandler
80 from .handlers.logout import LogoutHandler
81 from .handlers.notebooks import (
82 NewHandler, NamedNotebookHandler,
83 NotebookCopyHandler, NotebookRedirectHandler
84 )
85
86 from .handlers.base import AuthenticatedFileHandler
87 from .handlers.files import FileFindHandler
88
70
89 from .nbmanager import NotebookManager
71 from .base.handlers import AuthenticatedFileHandler
90 from .filenbmanager import FileNotebookManager
72 from .base.files import FileFindHandler
91 from .clustermanager import ClusterManager
92
73
93 from IPython.config.application import catch_config_error, boolean_flag
74 from IPython.config.application import catch_config_error, boolean_flag
94 from IPython.core.application import BaseIPythonApplication
75 from IPython.core.application import BaseIPythonApplication
@@ -140,7 +121,7 b' def random_ports(port, n):'
140
121
141 def load_handlers(name):
122 def load_handlers(name):
142 """Load the (URL pattern, handler) tuples for each component."""
123 """Load the (URL pattern, handler) tuples for each component."""
143 name = 'IPython.frontend.html.notebook.handlers.' + name
124 name = 'IPython.frontend.html.notebook.' + name
144 mod = __import__(name, fromlist=['default_handlers'])
125 mod = __import__(name, fromlist=['default_handlers'])
145 return mod.default_handlers
126 return mod.default_handlers
146
127
@@ -156,14 +137,14 b' class NotebookWebApplication(web.Application):'
156
137
157 # Load the (URL pattern, handler) tuples for each component.
138 # Load the (URL pattern, handler) tuples for each component.
158 handlers = []
139 handlers = []
159 handlers.extend(load_handlers('base'))
140 handlers.extend(load_handlers('base.handlers'))
160 handlers.extend(load_handlers('tree'))
141 handlers.extend(load_handlers('tree.handlers'))
161 handlers.extend(load_handlers('login'))
142 handlers.extend(load_handlers('auth.login'))
162 handlers.extend(load_handlers('logout'))
143 handlers.extend(load_handlers('auth.logout'))
163 handlers.extend(load_handlers('notebooks'))
144 handlers.extend(load_handlers('notebooks.handlers'))
164 handlers.extend(load_handlers('kernelsapi'))
145 handlers.extend(load_handlers('kernels.handlers'))
165 handlers.extend(load_handlers('notebooksapi'))
146 handlers.extend(load_handlers('notebooks.apihandlers'))
166 handlers.extend(load_handlers('clustersapi'))
147 handlers.extend(load_handlers('clusters.handlers'))
167 handlers.extend([
148 handlers.extend([
168 (r"/files/(.*)", AuthenticatedFileHandler, {'path' : notebook_manager.notebook_dir}),
149 (r"/files/(.*)", AuthenticatedFileHandler, {'path' : notebook_manager.notebook_dir}),
169 ])
150 ])
@@ -485,7 +466,7 b' class NotebookApp(BaseIPythonApplication):'
485 else:
466 else:
486 self.log.info("Using MathJax: %s", new)
467 self.log.info("Using MathJax: %s", new)
487
468
488 notebook_manager_class = DottedObjectName('IPython.frontend.html.notebook.filenbmanager.FileNotebookManager',
469 notebook_manager_class = DottedObjectName('IPython.frontend.html.notebook.notebooks.filenbmanager.FileNotebookManager',
489 config=True,
470 config=True,
490 help='The notebook manager class to use.')
471 help='The notebook manager class to use.')
491
472
@@ -22,7 +22,7 b' from zmq.utils import jsonapi'
22
22
23 from IPython.utils.jsonutil import date_default
23 from IPython.utils.jsonutil import date_default
24
24
25 from .base import IPythonHandler, authenticate_unless_readonly
25 from ..base.handlers import IPythonHandler, authenticate_unless_readonly
26
26
27 #-----------------------------------------------------------------------------
27 #-----------------------------------------------------------------------------
28 # Notebook web service handlers
28 # Notebook web service handlers
@@ -20,7 +20,7 b' import os'
20 from tornado import web
20 from tornado import web
21 HTTPError = web.HTTPError
21 HTTPError = web.HTTPError
22
22
23 from .base import IPythonHandler, authenticate_unless_readonly
23 from ..base.handlers import IPythonHandler, authenticate_unless_readonly
24 from ..utils import url_path_join
24 from ..utils import url_path_join
25
25
26 #-----------------------------------------------------------------------------
26 #-----------------------------------------------------------------------------
@@ -16,7 +16,7 b' Authors:'
16 # Imports
16 # Imports
17 #-----------------------------------------------------------------------------
17 #-----------------------------------------------------------------------------
18
18
19 from .base import IPythonHandler, authenticate_unless_readonly
19 from ..base.handlers import IPythonHandler, authenticate_unless_readonly
20
20
21 #-----------------------------------------------------------------------------
21 #-----------------------------------------------------------------------------
22 # Handlers
22 # Handlers
General Comments 0
You need to be logged in to leave comments. Login now