You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/developers/extensions.rst
+67-2Lines changed: 67 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -408,14 +408,14 @@ Migrating an extension to use Jupyter Server
408
408
409
409
If you're a developer of a `classic Notebook Server`_ extension, your extension should be able to work with *both* the classic notebook server and ``jupyter_server``.
410
410
411
-
There are two key steps to make this happen:
411
+
There are a few key steps to make this happen:
412
412
413
413
1. Point Jupyter Server to the ``load_jupyter_server_extension`` function with a new reference name.
414
414
The ``load_jupyter_server_extension`` function was the key to loading a server extension in the classic Notebook Server. Jupyter Server expects the name of this function to be prefixed with an underscore—i.e. ``_load_jupyter_server_extension``. You can easily achieve this by adding a reference to the old function name with the new name in the same module.
415
415
416
416
.. code-block:: python
417
417
418
-
defload_jupyter_server_extension(nbapp):
418
+
defload_jupyter_server_extension(nb_server_app):
419
419
...
420
420
421
421
# Reference the old function name with the new function name.
@@ -475,7 +475,72 @@ There are two key steps to make this happen:
475
475
476
476
)
477
477
478
+
3. (Optional) Point extension at the new favicon location.
479
+
The favicons in the Jupyter Notebook have been moved to a new location in Jupyter Server. If your extension is using one of these icons, you'll want to add a set of redirect handlers this. (In ``ExtensionApp``, this is handled automatically).
478
480
481
+
This usually means adding a chunk to your ``load_jupyter_server_extension`` function similar to this:
0 commit comments