This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## app.py | |
# 导入Flask和SQLAlchemy | |
from flask import Flask | |
from flask_sqlalchemy import SQLAlchemy | |
# 创建Flask应用实例 | |
app = Flask(__name__) | |
# 配置SQLite数据库 | |
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///database.db' |