mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 22:13:00 +00:00
Add support for default_url
This commit is contained in:
@@ -140,6 +140,13 @@ class Spawner(LoggingConfigurable):
|
|||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
default_url = Unicode('', config=True,
|
||||||
|
help="""The default URL for the single-user server
|
||||||
|
|
||||||
|
`%U` will be expanded to the user's username
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
disable_user_config = Bool(False, config=True,
|
disable_user_config = Bool(False, config=True,
|
||||||
help="""Disable per-user configuration of single-user servers.
|
help="""Disable per-user configuration of single-user servers.
|
||||||
|
|
||||||
@@ -216,6 +223,10 @@ class Spawner(LoggingConfigurable):
|
|||||||
if self.notebook_dir:
|
if self.notebook_dir:
|
||||||
self.notebook_dir = self.notebook_dir.replace("%U",self.user.name)
|
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.default_url:
|
||||||
|
self.default_url = self.default_url.replace("%U",self.user.name)
|
||||||
|
args.append('--NotebookApp.default_url=%s' % self.default_url)
|
||||||
|
|
||||||
if self.debug:
|
if self.debug:
|
||||||
args.append('--debug')
|
args.append('--debug')
|
||||||
if self.disable_user_config:
|
if self.disable_user_config:
|
||||||
|
Reference in New Issue
Block a user