mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 14:03:02 +00:00
@@ -26,10 +26,9 @@ def write_alembic_ini(alembic_ini='alembic.ini', db_url='sqlite:///jupyterhub.sq
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
alembic_ini: str
|
||||
alembic_ini : str
|
||||
path to the alembic.ini file that should be written.
|
||||
db_url: str
|
||||
db_url : str
|
||||
The SQLAlchemy database url, e.g. `sqlite:///jupyterhub.sqlite`.
|
||||
"""
|
||||
with open(ALEMBIC_INI_TEMPLATE_PATH) as f:
|
||||
@@ -58,13 +57,11 @@ def _temp_alembic_ini(db_url):
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
||||
db_url: str
|
||||
db_url : str
|
||||
The SQLAlchemy database url, e.g. `sqlite:///jupyterhub.sqlite`.
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
||||
alembic_ini: str
|
||||
The path to the temporary alembic.ini that we have created.
|
||||
This file will be cleaned up on exit from the context manager.
|
||||
|
@@ -668,12 +668,15 @@ class HubOAuth(HubAuth):
|
||||
|
||||
Parameters
|
||||
----------
|
||||
handler (RequestHandler): A tornado RequestHandler
|
||||
next_url (str): The page to redirect to on successful login
|
||||
handler : RequestHandler
|
||||
A tornado RequestHandler
|
||||
next_url : str
|
||||
The page to redirect to on successful login
|
||||
|
||||
Returns
|
||||
-------
|
||||
state (str): The OAuth state that has been stored in the cookie (url safe, base64-encoded)
|
||||
state : str
|
||||
The OAuth state that has been stored in the cookie (url safe, base64-encoded)
|
||||
"""
|
||||
extra_state = {}
|
||||
if handler.get_cookie(self.state_cookie_name):
|
||||
@@ -710,7 +713,8 @@ class HubOAuth(HubAuth):
|
||||
|
||||
Parameters
|
||||
----------
|
||||
next_url (str): The URL of the page to redirect to on successful login.
|
||||
next_url : str
|
||||
The URL of the page to redirect to on successful login.
|
||||
|
||||
Returns
|
||||
-------
|
||||
|
@@ -729,7 +729,7 @@ class Spawner(LoggingConfigurable):
|
||||
Returns
|
||||
-------
|
||||
state: dict
|
||||
a JSONable dict of state
|
||||
a JSONable dict of state
|
||||
"""
|
||||
state = {}
|
||||
return state
|
||||
|
@@ -70,9 +70,8 @@ def check_db_locks(func):
|
||||
The decorator relies on an instance of JupyterHubApp being the first
|
||||
argument to the decorated function.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
Examples
|
||||
--------
|
||||
@check_db_locks
|
||||
def api_request(app, *api_path, **kwargs):
|
||||
|
||||
|
Reference in New Issue
Block a user