@@ -31,9 +31,10 @@ def make_application(
3131 user_admin_field = 'admin' ,
3232 user_admin_value = True ,
3333 # extras
34- extra_handlers = None ,
35- extra_context = None ,
36- api_revision = 'v1' ):
34+ extra_handlers = None ,
35+ extra_context = None ,
36+ api_revision = 'v1' ):
37+
3738 extra_handlers = extra_handlers or []
3839 extra_context = extra_context or {}
3940
@@ -57,7 +58,6 @@ def make_application(
5758 default_handlers = extra_handlers + [
5859 (r"/" , HTMLOpenHandler , {'template' : 'index.html' , 'context' : context }),
5960 (r"/index.html" , HTMLOpenHandler , {'template' : 'index.html' , 'context' : context }),
60- (r"/home" , HTMLOpenHandler , {'template' : 'home.html' , 'context' : context }),
6161 (r"/api/{}/login" .format (api_revision ), LoginHandler , context ),
6262 (r"/api/{}/logout" .format (api_revision ), LogoutHandler , context ),
6363 (r"/api/{}/register" .format (api_revision ), RegisterHandler , context ),
@@ -67,7 +67,13 @@ def make_application(
6767 ]
6868
6969 for _ , handler , handler_kwargs in extra_handlers :
70- if issubclass (handler , ServerHandler ):
70+ if issubclass (handler , HTMLOpenHandler ):
71+ if 'context' in handler_kwargs :
72+ handler_kwargs ['context' ].update (context )
73+ else :
74+ handler_kwargs ['context' ] = context
75+
76+ elif issubclass (handler , ServerHandler ):
7177 handler_kwargs .update (context )
7278
7379 settings = {
0 commit comments