mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 14:33:00 +00:00
username parameter for notebook_dir
Allow specifying user-specific notebook directories outside of user's home folder
This commit is contained in:
@@ -136,6 +136,7 @@ class Spawner(LoggingConfigurable):
|
|||||||
help="""The notebook directory for the single-user server
|
help="""The notebook directory for the single-user server
|
||||||
|
|
||||||
`~` will be expanded to the user's home directory
|
`~` will be expanded to the user's home directory
|
||||||
|
`%U` will be expanded to the user's username
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -204,6 +205,7 @@ class Spawner(LoggingConfigurable):
|
|||||||
if self.ip:
|
if self.ip:
|
||||||
args.append('--ip=%s' % self.ip)
|
args.append('--ip=%s' % self.ip)
|
||||||
if self.notebook_dir:
|
if self.notebook_dir:
|
||||||
|
self.notebook_dir = self.notebook_dir.replace("%U",self.user.name)
|
||||||
args.append('--notebook-dir=%s' % self.notebook_dir)
|
args.append('--notebook-dir=%s' % self.notebook_dir)
|
||||||
if self.debug:
|
if self.debug:
|
||||||
args.append('--debug')
|
args.append('--debug')
|
||||||
|
Reference in New Issue
Block a user