更改pycharm默认运行文件

在pycharm运行flask程序时会出现usage: manage.py [-?] {test,shell,db,runserver} ... positional arguments错误;

也或者是提示app.py没有找到,

这个错误的本源就是pycharm默认运行的flask应用是app.py,而我们在写一些flask程序时并不一定是app.py,因此,我们需要去修改一下flask默认的启动程序,这样就可以解决这个问题了。

打开run->edit configurations

按照如下选项,修改Target为响应的启动程序即可。

猜你喜欢

转载自blog.csdn.net/hrbust_cxl/article/details/89739929