mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-11 03:52:59 +00:00
Edit spacing in singleuser.py
This commit is contained in:
@@ -39,16 +39,20 @@ from jupyterhub import __version__
|
|||||||
from .services.auth import HubAuth, HubAuthenticated
|
from .services.auth import HubAuth, HubAuthenticated
|
||||||
from .utils import url_path_join
|
from .utils import url_path_join
|
||||||
|
|
||||||
|
|
||||||
# Authenticate requests with the Hub
|
# Authenticate requests with the Hub
|
||||||
|
|
||||||
|
|
||||||
class HubAuthenticatedHandler(HubAuthenticated):
|
class HubAuthenticatedHandler(HubAuthenticated):
|
||||||
"""Class we are going to patch-in for authentication with the Hub"""
|
"""Class we are going to patch-in for authentication with the Hub"""
|
||||||
@property
|
@property
|
||||||
def hub_auth(self):
|
def hub_auth(self):
|
||||||
return self.settings['hub_auth']
|
return self.settings['hub_auth']
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hub_users(self):
|
def hub_users(self):
|
||||||
return { self.settings['user'] }
|
return { self.settings['user'] }
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hub_groups(self):
|
def hub_groups(self):
|
||||||
if self.settings['group']:
|
if self.settings['group']:
|
||||||
@@ -124,6 +128,7 @@ Control Panel</a>
|
|||||||
{% endblock logo %}
|
{% endblock logo %}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def _exclude_home(path_list):
|
def _exclude_home(path_list):
|
||||||
"""Filter out any entries in a path list that are in my home directory.
|
"""Filter out any entries in a path list that are in my home directory.
|
||||||
|
|
||||||
@@ -150,6 +155,7 @@ class SingleUserNotebookApp(NotebookApp):
|
|||||||
|
|
||||||
user = CUnicode().tag(config=True)
|
user = CUnicode().tag(config=True)
|
||||||
group = CUnicode().tag(config=True)
|
group = CUnicode().tag(config=True)
|
||||||
|
|
||||||
@observe('user')
|
@observe('user')
|
||||||
def _user_changed(self, change):
|
def _user_changed(self, change):
|
||||||
self.log.name = change.new
|
self.log.name = change.new
|
||||||
@@ -157,12 +163,14 @@ class SingleUserNotebookApp(NotebookApp):
|
|||||||
hub_host = Unicode().tag(config=True)
|
hub_host = Unicode().tag(config=True)
|
||||||
|
|
||||||
hub_prefix = Unicode('/hub/').tag(config=True)
|
hub_prefix = Unicode('/hub/').tag(config=True)
|
||||||
|
|
||||||
@default('hub_prefix')
|
@default('hub_prefix')
|
||||||
def _hub_prefix_default(self):
|
def _hub_prefix_default(self):
|
||||||
base_url = os.environ.get('JUPYTERHUB_BASE_URL') or '/'
|
base_url = os.environ.get('JUPYTERHUB_BASE_URL') or '/'
|
||||||
return base_url + 'hub/'
|
return base_url + 'hub/'
|
||||||
|
|
||||||
hub_api_url = Unicode().tag(config=True)
|
hub_api_url = Unicode().tag(config=True)
|
||||||
|
|
||||||
@default('hub_api_url')
|
@default('hub_api_url')
|
||||||
def _hub_api_url_default(self):
|
def _hub_api_url_default(self):
|
||||||
return os.environ.get('JUPYTERHUB_API_URL') or 'http://127.0.0.1:8081/hub/api'
|
return os.environ.get('JUPYTERHUB_API_URL') or 'http://127.0.0.1:8081/hub/api'
|
||||||
|
Reference in New Issue
Block a user