Skip to content

Commit cf55382

Browse files
committed
get app name from function
1 parent 81c1244 commit cf55382

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pywebio/output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1907,7 +1907,7 @@ def popup(title: str, content: Union[str, Output, List[Union[str, Output]]] = No
19071907
When set to ``False``, the popup window can only be closed by :func:`popup_close()`,
19081908
at this time the ``implicit_close`` parameter will be ignored.
19091909
1910-
``popup()`` can be used in 3 ways: direct call, context manager, and decorator.
1910+
``popup()`` can be used in 2 ways: direct call and context manager.
19111911
19121912
* direct call:
19131913

pywebio/platform/page.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ def parse_app_metadata(func):
7878
else:
7979
title, description = parts[0], ''
8080

81+
if not title:
82+
title = get_function_name(func)
83+
8184
if not meta.title:
8285
meta = meta._replace(title=title, description=description)
8386

0 commit comments

Comments
 (0)