This commit is contained in:
2025-09-19 08:21:03 +08:00
parent 01503d6862
commit fc5fb355b4
4 changed files with 293 additions and 0 deletions
+4
View File
@@ -6,12 +6,16 @@ import random
# 导入用户模块
from user import bp as user_bp, init_user_db
# 导入API模块
from api import api_bp
app = Flask(__name__)
app.secret_key = 'your_secret_key' # 生产环境中应该使用更安全的密钥
# 注册用户蓝图
app.register_blueprint(user_bp)
# 注册API蓝图
app.register_blueprint(api_bp)
# 确保模板文件夹存在
templates_dir = os.path.join(os.path.dirname(__file__), 'templates')