mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Merge pull request #2290 from ellisonbg/nbmanager
Renamed BaseNotebookManager to NotebookManager so that old config files continue to work.
This commit is contained in:
commit
ac0eabc5f4
@ -23,7 +23,7 @@ import glob
|
||||
|
||||
from tornado import web
|
||||
|
||||
from .basenbmanager import BaseNotebookManager
|
||||
from .nbmanager import NotebookManager
|
||||
from IPython.nbformat import current
|
||||
from IPython.utils.traitlets import Unicode, Dict, Bool, TraitError
|
||||
|
||||
@ -31,7 +31,7 @@ from IPython.utils.traitlets import Unicode, Dict, Bool, TraitError
|
||||
# Classes
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
class FileNotebookManager(BaseNotebookManager):
|
||||
class FileNotebookManager(NotebookManager):
|
||||
|
||||
save_script = Bool(False, config=True,
|
||||
help="""Automatically create a Python script when saving the notebook.
|
||||
|
@ -29,7 +29,7 @@ from IPython.utils.traitlets import List, Dict, Unicode, TraitError
|
||||
# Classes
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
class BaseNotebookManager(LoggingConfigurable):
|
||||
class NotebookManager(LoggingConfigurable):
|
||||
|
||||
# Todo:
|
||||
# The notebook_dir attribute is used to mean a couple of different things:
|
@ -51,7 +51,7 @@ from .handlers import (LoginHandler, LogoutHandler,
|
||||
MainClusterHandler, ClusterProfileHandler, ClusterActionHandler,
|
||||
FileFindHandler,
|
||||
)
|
||||
from .basenbmanager import BaseNotebookManager
|
||||
from .nbmanager import NotebookManager
|
||||
from .filenbmanager import FileNotebookManager
|
||||
from .clustermanager import ClusterManager
|
||||
|
||||
@ -237,7 +237,7 @@ aliases.update({
|
||||
'port-retries': 'NotebookApp.port_retries',
|
||||
'keyfile': 'NotebookApp.keyfile',
|
||||
'certfile': 'NotebookApp.certfile',
|
||||
'notebook-dir': 'BaseNotebookManager.notebook_dir',
|
||||
'notebook-dir': 'NotebookManager.notebook_dir',
|
||||
'browser': 'NotebookApp.browser',
|
||||
})
|
||||
|
||||
@ -265,7 +265,7 @@ class NotebookApp(BaseIPythonApplication):
|
||||
"""
|
||||
examples = _examples
|
||||
|
||||
classes = IPythonConsoleApp.classes + [MappingKernelManager, BaseNotebookManager,
|
||||
classes = IPythonConsoleApp.classes + [MappingKernelManager, NotebookManager,
|
||||
FileNotebookManager]
|
||||
flags = Dict(flags)
|
||||
aliases = Dict(aliases)
|
||||
@ -431,7 +431,7 @@ class NotebookApp(BaseIPythonApplication):
|
||||
else:
|
||||
self.file_to_run = f
|
||||
nbdir = os.path.dirname(f)
|
||||
self.config.BaseNotebookManager.notebook_dir = nbdir
|
||||
self.config.NotebookManager.notebook_dir = nbdir
|
||||
|
||||
def init_configurables(self):
|
||||
# force Session default to be secure
|
||||
|
Loading…
Reference in New Issue
Block a user