gpt4 book ai didi

ajax - 当 Debug 为 False 时如何保持 Flask use_reloader 工作?

转载 作者:行者123 更新时间:2023-12-02 12:14:42 25 4
gpt4 key购买 nike

我的 Flask 应用程序启动了两次,所以我尝试了“debug=False”,但这会阻止我在更改 ajax 代码时自动重新加载。所以我像这样启动我的应用程序if name == 'ma​​in': app.run(debug=False, use_reloader=True,host='0.0.0.0', port=4002)

但是 auto_reload 不起作用

最佳答案

官方Flask文档说:

debug must be True (i.e., exceptions must be caught) in order for the other two options (i.e use_reloader and use_debugger) to have any value.

这意味着,使用 debug=False 时,use_reloader 不会有任何使用值(value),因此,你不会得到你想要的东西.

关于ajax - 当 Debug 为 False 时如何保持 Flask use_reloader 工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46431181/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com