Replies: 8 comments
-
你的意思是让程序代码发生变动的时候自动重启开发服务器?你是怎么启动程序的? |
Beta Was this translation helpful? Give feedback.
-
flask run --reload |
Beta Was this translation helpful? Give feedback.
-
试试通过设置 FLASK_ENV 开启调试模式:
|
Beta Was this translation helpful? Give feedback.
-
!!! 这么长时间我都快忘了,麻烦您再帮我看看
python3 -m venv env
. env/bin/activate |
Beta Was this translation helpful? Give feedback.
-
估计是 reloader 在特定操作系统的 bug,可以试下安装 watchdog:
安装后 Flask 会用它来检测文件变动(如果已经安装那就卸载掉试试……)。 (另,开启调试模式后不需要再传入 --reload 参数) |
Beta Was this translation helpful? Give feedback.
-
还是没什么用啊,可能是我的系统有问题,顺便问一下,搭建这个虚拟环境是必须的吗 |
Beta Was this translation helpful? Give feedback.
-
或许可以换个编辑器试一下,记得要手动保存改动或是开启自动保存。
并不是必须的,主要的用处是方便记录当前项目的依赖列表。 |
Beta Was this translation helpful? Give feedback.
-
再次打扰,补充下完整的gif |
Beta Was this translation helpful? Give feedback.
-
我想用到热部署,按照网上的教程
但是这没有什么用
Beta Was this translation helpful? Give feedback.
All reactions