mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 22:13:00 +00:00
Add Spawner form
If Spawner.options_form is specified, a form providing input controls is shown to the user prior to launch. Spawners access the result via the `self.user_options` dict. The default spawners offer no form.
This commit is contained in:
@@ -107,7 +107,8 @@ class User(HasTraits):
|
||||
return quote(self.name, safe='@')
|
||||
|
||||
@gen.coroutine
|
||||
def spawn(self, spawner_class, base_url='/', hub=None, config=None, authenticator=None):
|
||||
def spawn(self, spawner_class, base_url='/', hub=None, config=None,
|
||||
authenticator=None, options=None):
|
||||
"""Start the user's spawner"""
|
||||
db = self.db
|
||||
if hub is None:
|
||||
@@ -129,6 +130,7 @@ class User(HasTraits):
|
||||
hub=hub,
|
||||
db=db,
|
||||
authenticator=authenticator,
|
||||
user_options=options or {},
|
||||
)
|
||||
# we are starting a new server, make sure it doesn't restore state
|
||||
spawner.clear_state()
|
||||
|
Reference in New Issue
Block a user