七十四:flask信号之内置信号

flask所有的内置信号

1.template_rendered:模板渲染完成后的信号
2.before_render_template:模板渲染之前的信号
3.request_started:模板开始渲染
4.request_finished:模板渲染完成
5.request_tearing_down:request对象被销毁
6.got_request_exception:视图函数发送异常的心愿,一般可以监听此信号来记录网站的异常
7.appcontext_tearing_down:app上下文被销毁的信号
8.appcontext_pushed:app上下文被推入到栈上的信号
9.appcontext_popped:app上下文被推出栈的信号
10.message_flashed:调用lflask的flashed方法的信号

render_template源码

template_rendered 模板渲染完成后

got_request_exception

猜你喜欢

转载自www.cnblogs.com/zhongyehai/p/11874855.html
今日推荐