first commit

This commit is contained in:
rjb
2025-12-21 00:20:27 +08:00
commit 6fb3c6c23d
42 changed files with 2265 additions and 0 deletions

25
config/testing.py Normal file
View File

@@ -0,0 +1,25 @@
"""
测试环境配置
"""
from .base import Config
class TestingConfig(Config):
"""
测试环境配置
使用内存数据库关闭CSRF保护
"""
DEBUG = True
TESTING = True
# 测试环境使用内存数据库
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
# 测试环境关闭CSRF保护
WTF_CSRF_ENABLED = False
# 测试环境日志级别
LOG_LEVEL = 'DEBUG'
# 测试环境允许所有跨域请求
CORS_ORIGINS = ['*']