This commit is contained in:
rob
2025-09-11 10:15:27 +01:00
commit c1011af06a
53 changed files with 5953 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from dotenv import load_dotenv
from models.base import Base
import os
load_dotenv()
app = Flask(__name__, static_folder="static")
app.config.update(
{
"DEBUG": bool(os.environ.get("DEBUG") == "True"),
"SQLALCHEMY_DATABASE_URI": "sqlite:///database.sqlite",
"SQLALCHEMY_ECHO": bool(os.environ.get("SQLALCHEMY_ECHO") == "True"),
"SQLALCHEMY_TRACK_MODIFICATIONS": bool(
os.environ.get("SQLALCHEMY_TRACK_MODIFICATIONS") == "True"
),
}
)
db = SQLAlchemy(app, model_class=Base)
migrate = Migrate(app, db, render_as_batch=True)