Update __init__.py

fix issue with python 3.10 where new Flask packages could not run the app
This commit is contained in:
ghostersk
2024-02-11 09:48:42 +00:00
committed by GitHub
parent 3a7b7e63a6
commit a1942bb56d
+3 -1
View File
@@ -11,6 +11,8 @@ db = SQLAlchemy(app)
# Initialize the database
from tiny0.models import URL
db.create_all()
# DB needs to run in context, for Python 3.10 at least and newest packages
with app.app_context():
db.create_all()
from tiny0 import routes