Flask-Web-App-Tutorial
Flask-Web-App-Tutorial copied to clipboard
App context is now required in Flask-SQLAlchemy
For newer versions of Flask-SQLAlchemy (>3.x I believe), app context is required when performing db.create_all() and other operations.
"You must be in an active Flask application context to execute queries and to access the session and engine." See https://flask-sqlalchemy.palletsprojects.com/en/3.0.x/quickstart/