Skip to content

Commit a790cf4

Browse files
committed
enable extensionapps to configure the server when launched directly
1 parent 9027baf commit a790cf4

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

jupyter_server/extension/application.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,12 @@ class method. This method can be set as a entry_point in
144144
# side-by-side when launched directly.
145145
load_other_extensions = True
146146

147-
# Pass se
148-
server_config = {}
147+
# A useful class property that subclasses can override to
148+
# configure the underlying Jupyter Server when this extension
149+
# is launched directly (using its `launch_instance` method).
150+
serverapp_config = {
151+
"open_browser": True
152+
}
149153

150154
# The extension name used to name the jupyter config
151155
# file, jupyter_{name}_config.
@@ -296,11 +300,10 @@ def _jupyter_server_config(cls):
296300
base_config = {
297301
"ServerApp": {
298302
"jpserver_extensions": {cls.get_extension_package(): True},
299-
"open_browser": True,
300303
"default_url": cls.extension_url
301304
}
302305
}
303-
base_config["ServerApp"].update(cls.server_config)
306+
base_config["ServerApp"].update(cls.serverapp_config)
304307
return base_config
305308

306309
def _link_jupyter_server_extension(self, serverapp):

0 commit comments

Comments
 (0)