python – Flask:如何在蓝图中的每个路径之前运行方法?

python – Flask:如何在蓝图中的每个路径之前运行方法?

我想让Flask Blueprint在执行任何路由之前始终运行一个方法.我没有用自定义装饰器装饰我的蓝图中的每个路线方法,而是希望能够做到这样的事情: def my_method(): do_stuffsection = Blueprint(section, __name__)# Register my_method() as a setup method th

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部