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

升级V1.8.0后,pywebio.config()中的title参数不起作用 #568

Closed
Siris-Rose opened this issue Apr 13, 2023 · 2 comments
Closed

升级V1.8.0后,pywebio.config()中的title参数不起作用 #568

Siris-Rose opened this issue Apr 13, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@Siris-Rose
Copy link

注: 对于PyWebIO使用咨询或对于其他人也可能有帮助的问题,请考虑移至 Discussions 进行发帖。

BUG描述
更新项目环境内的的pywebio版本至1.8.0后,使用pywebio.config()对PyWebIO应用进行配置,其中title参数不起作用,浏览器显示标题为pywebio任务名。

环境信息

  • 操作系统及版本: Ubuntu 20.04
  • 浏览器及版本: Google Chrome 111.0.5563.146
  • Python版本: python3.10
  • PyWebIO版本: 1.8.0
@Siris-Rose Siris-Rose added the bug Something isn't working label Apr 13, 2023
@wang0618
Copy link
Member

你应该是直接调用的pywebio.config()而不是使用的装饰器吧。

现在确定title的优先级是:

  1. @pywebio.config(title=) 装饰器获取
  2. 从任务函数的docstring获取
  3. 从函数名获取
  4. 从全局配置的 pywebio.config(title=) 获取

感觉3,4的优先级是有些不合理的,因为总是能从函数名获取到title,所以4永远不会达到了。

我之后会调换一下3,4的优先级

@Siris-Rose
Copy link
Author

是的,我从全局配置的,辛苦作者大大!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants