diff --git a/README.md b/README.md index f64a675..a1c7280 100644 --- a/README.md +++ b/README.md @@ -52,18 +52,11 @@ Appmode adds the following [configuration options](https://jupyter-notebook.read - `Appmode.show_edit_button` Show _Edit App_ button during Appmode. Default: True. - `Appmode.show_other_buttons` Show other buttons, e.g. Logout, during Appmode. Default: True. - `Appmode.temp_dir` Create temp notebooks under this directory. Default: Same directory as current notebook -- `Appmode.hidden_temp_files` Create temp notebooks as hidden files. Default: True -Writing to hidden files is disabled in newer versions of notebook. You will need to enable one of the following -configuration options to run appmode: +Writing hidden files is by default disabled in newer versions of Jupyter. +To allow Appmode to hide its temporary notebook copies the option `ContentsManager.allow_hidden` has to be set: ``` -ContentsManager.allow_hidden=True -or -Appmode.hidden_temp_files=False -``` -Example: -``` -jupyter notebook --Appmode.hidden_temp_files=False +jupyter notebook --ContentsManager.allow_hidden=True ``` ## Client Side Customization diff --git a/appmode/server_extension.py b/appmode/server_extension.py index 717e149..8d80b3c 100644 --- a/appmode/server_extension.py +++ b/appmode/server_extension.py @@ -32,7 +32,6 @@ class Appmode(LoggingConfigurable): show_edit_button = Bool(True, help="Show Edit App button during Appmode.", config=True) show_other_buttons = Bool(True, help="Show other buttons, e.g. Logout, during Appmode.", config=True) temp_dir = Unicode('', help="Create temporary Appmode notebooks in this directory.", config=True) - hidden_temp_files = Bool(True, help="Temporary Appmode notebooks are hidden files.", config=True) #=============================================================================== class AppmodeHandler(IPythonHandler): @@ -52,10 +51,6 @@ def show_other_buttons(self): def temp_dir(self): return self.settings['appmode'].temp_dir - @property - def hidden_temp_files(self): - return self.settings['appmode'].hidden_temp_files - #=========================================================================== @web.authenticated async def get(self, path): @@ -134,7 +129,7 @@ async def mk_tmp_copy(self, path): os.makedirs(dirname) fullbasename = os.path.basename(path) basename, ext = os.path.splitext(fullbasename) - if self.hidden_temp_files: + if cm.allow_hidden: basename = '.' + basename for i in itertools.count(): tmp_path = "%s/%s-%i%s"%(dirname, basename, i, ext)