This commit is contained in:
huangzhenpc
2025-02-26 18:42:59 +08:00
parent 1b81f4eebd
commit ce450544b1
6 changed files with 13 additions and 50 deletions

View File

@@ -1,15 +1,7 @@
from flask import Flask
from .config import Config
from .models import db
def create_app():
app = Flask(__name__)
app.config.from_object(Config)
# 初始化数据库
db.init_app(app)
with app.app_context():
db.create_all()
return app