Skip to content

Commit

Permalink
get app name from function
Browse files Browse the repository at this point in the history
  • Loading branch information
wang0618 committed Mar 12, 2023
1 parent 81c1244 commit cf55382
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pywebio/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -1907,7 +1907,7 @@ def popup(title: str, content: Union[str, Output, List[Union[str, Output]]] = No
When set to ``False``, the popup window can only be closed by :func:`popup_close()`,
at this time the ``implicit_close`` parameter will be ignored.
``popup()`` can be used in 3 ways: direct call, context manager, and decorator.
``popup()`` can be used in 2 ways: direct call and context manager.
* direct call:
Expand Down
3 changes: 3 additions & 0 deletions pywebio/platform/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ def parse_app_metadata(func):
else:
title, description = parts[0], ''

if not title:
title = get_function_name(func)

if not meta.title:
meta = meta._replace(title=title, description=description)

Expand Down

0 comments on commit cf55382

Please sign in to comment.