quick script to test stuff via flask shell

This commit is contained in:
eclipse 2025-07-24 10:49:26 +02:00
parent a7244942ed
commit ab97ef4b44

14
tmp.py Normal file
View File

@ -0,0 +1,14 @@
from flask import Flask
app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite://"
app.config["SQLALCHEMY_ECHO"] = True
from flask_sqlalchemy import SQLAlchemy
from the_works.models import Base
db = SQLAlchemy(model_class=Base)
db.init_app(app)
with app.app_context():
db.create_all()