Skip to content

[Feature Request]单个应用,如何使用@装饰器控制用户验证 #289

@nipsevenlovelonglegs

Description

@nipsevenlovelonglegs

开发一个flask系统,有用户验证, 挂载两个webio制作的应用,如何使用@装饰器,进行用户验证才能打开webio应用呢

rom pywebio.platform.flask import webio_view
from flask import Flask

app = Flask(name)

app.add_url_rule('/tool', 'webio_view', webio_view(task_func),
methods=['GET', 'POST', 'OPTIONS']) # need GET,POST and OPTIONS methods

app.run(host='localhost', port=80)

示例中增加了@user(用户验证装饰器) 并不管用

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions