I was following this documentation on directory management for Flask projects. Now, I'm trying to run my flask application from PyCharm. I have added the below mentioned Environment Variables in Edit Configurations...
:
FLASK_DEBUG=true
FLASK_APP=<absolute-path-to-root-directory-of-application>
I add the Script
as flask run
The output running this configuration is this:
../red-flask/venv/bin/python "flask run"
../red-flask/venv/bin/python: can't open file 'flask run': [Errno 2] No such file or directory
Process finished with exit code 2
My project directory looks like:
/flask_app
setup.py
/flask_app
__init__.py
views.py
/static
style.css
/templates
layout.html
index.html
login.html
...
I am unable to figure out how to make this work, any help is appreciated.