Despite trial and error I cannot get the command 'flask shell' to run.
This is what happens when i run flask shell
from the project dir:
$ set FLASK_APP=
Error: While importing "project_dir.wsgi", an ImportError was raised: [...] from flask_app.app import construct_app ModuleNotFoundError: No module named 'flask_app'
$ set FLASK_APP=wsgi
ModuleNotFoundError: No module named 'flask_app'
$ set FLASK_APP=flask_app\__init__.py:construct_app
Error: module 'backoffice_nova.flask_app' has no attribute 'construct_app'
$ set FLASK_APP=flask_app:contruct_app("development")
Error: module 'backoffice_nova.flask_app' has no attribute 'contruct_app'
My project structure looks like this
/project_dir
.
+-- flask_app
¦ +-- __init__.py
¦ +-- app
¦ +-- main
¦ ¦ +-- __init__.py
¦ +-- static
¦ +-- templates
¦ +--models.py
¦ +-- __init__.py
+-- src
¦ +-- __init__.py
¦ +-- ...
+-- tests
¦ +-- __init__.py
¦ +-- ...
+-- environment.yml
+-- wsgi.py
+-- config.py
To start the app I normally run wsgi.py
#wsgi.py
from flask_app.app import construct_app
app = construct_app("development")
if __name__ == "__main__":
app.run(host='localhost', debug=True)