fix: 修复 Socket.IO 命名冲突 + config.py 配置 + 添加 gitignore

This commit is contained in:
2026-03-14 21:00:34 +08:00
parent 6bafd21e02
commit f2caeadf05
4 changed files with 36 additions and 9 deletions

View File

@@ -51,10 +51,6 @@ class DevelopmentConfig(Config):
class ProductionConfig(Config):
"""生产环境配置"""
DEBUG = False
# 生产环境强制使用 PostgreSQL
if not os.environ.get('DATABASE_URL'):
raise ValueError("DATABASE_URL must be set in production")
class TestingConfig(Config):
@@ -62,6 +58,8 @@ class TestingConfig(Config):
TESTING = True
SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:'
WTF_CSRF_ENABLED = False
TESTING = True
DEBUG = True
config = {