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