Add custom handlers and allow setting of defaults

This commit is contained in:
Haw-minn Lu
2018-04-27 15:58:59 -07:00
parent 4e5f43aeae
commit bc86ee1c31
2 changed files with 19 additions and 2 deletions

View File

@@ -431,9 +431,15 @@ class BaseHandler(RequestHandler):
# default URL after login
# if self.redirect_to_server, default login URL initiates spawn
if user and self.redirect_to_server:
next_url = user.url
if self.config.JupyterHub.get('default_user_page'):
next_url = self.config.JupyterHub['default_user_page']
else:
next_url = user.url
else:
next_url = url_path_join(self.hub.base_url, 'home')
if self.config.JupyterHub.get('default_page'):
next_url = self.config.JupyterHub['default_page']
else:
next_url = url_path_join(self.hub.base_url, 'home')
return next_url
async def login_user(self, data=None):