Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update simple extension examples: _jupyter_server_extension_points #1426

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions examples/simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ open http://localhost:8888/
# TODO Fix Default URL, it does not show on startup.
# Home page as defined by default_url = '/default'.
open http://localhost:8888/simple_ext11/default
# HTML static page.
open http://localhost:8888/static/simple_ext11/test.html
# Content from Handlers.
open http://localhost:8888/simple_ext11/params/test?var1=foo
# Content from Template.
Expand Down
5 changes: 4 additions & 1 deletion examples/simple/simple_ext1/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from .application import SimpleApp1


def _jupyter_server_extension_paths():
def _jupyter_server_extension_points():
return [{"module": "simple_ext1.application", "app": SimpleApp1}]


_jupyter_server_extension_paths = _jupyter_server_extension_points
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these lines still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I'd keep them for backwards compatibility, I removed them now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think since these examples are on the 2.x branch they can use the 2.x features. 😄

5 changes: 4 additions & 1 deletion examples/simple/simple_ext11/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
from .application import SimpleApp11


def _jupyter_server_extension_paths():
def _jupyter_server_extension_points():
return [{"module": "simple_ext11.application", "app": SimpleApp11}]


_jupyter_server_extension_paths = _jupyter_server_extension_points
5 changes: 4 additions & 1 deletion examples/simple/simple_ext2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
from .application import SimpleApp2


def _jupyter_server_extension_paths():
def _jupyter_server_extension_points():
return [
{"module": "simple_ext2.application", "app": SimpleApp2},
]


_jupyter_server_extension_paths = _jupyter_server_extension_points
Loading