Update __init__.py
fix issue with python 3.10 where new Flask packages could not run the app
This commit is contained in:
+3
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user