Skip to content

Commit

Permalink
fix demo
Browse files Browse the repository at this point in the history
  • Loading branch information
wang0618 committed Nov 9, 2021
1 parent 3c7c0c9 commit 352019e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions demos/doc_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from pywebio.output import *
from pywebio.session import *
from pywebio.pin import *


##########################################


Expand Down Expand Up @@ -121,6 +123,6 @@ def get_app():
return app


main = get_app()
if __name__ == '__main__':
a = get_app()
start_server(get_app(), debug=True, port=8080, cdn=False)
start_server(main, debug=True, port=8080, cdn=False)
2 changes: 2 additions & 0 deletions demos/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ def show_popup():

@config(css_style=style)
def page():
"""PyWebIO Theme Preview"""

theme = eval_js("new URLSearchParams(window.location.search).get('app')")
if theme not in ALL_THEME:
theme = 'default'
Expand Down

0 comments on commit 352019e

Please sign in to comment.