from flask import Flask from flask_migrate import Migrate from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() migrate = Migrate() def create_app(): APP = Flask(__name__) APP.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///schedule.db" APP.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False db.init_app(APP) migrate.init_app(APP, db, render_as_batch=True) return APP