commit
This commit is contained in:
10
config.py
10
config.py
@@ -57,6 +57,16 @@ class BaseConfig:
|
||||
# 调试模式
|
||||
DEBUG = os.getenv('DEBUG', 'False').lower() == 'true'
|
||||
|
||||
# 测试配置
|
||||
AUTO_CLOSE_BROWSER = os.getenv('AUTO_CLOSE_BROWSER', 'False').lower() == 'true' # 测试完成后是否自动关闭浏览器
|
||||
|
||||
# MySQL数据库配置
|
||||
MYSQL_HOST = os.getenv('MYSQL_HOST', 'localhost')
|
||||
MYSQL_PORT = int(os.getenv('MYSQL_PORT', 3306))
|
||||
MYSQL_USER = os.getenv('MYSQL_USER', 'root')
|
||||
MYSQL_PASSWORD = os.getenv('MYSQL_PASSWORD', '')
|
||||
MYSQL_DATABASE = os.getenv('MYSQL_DATABASE', 'ai_article')
|
||||
|
||||
@classmethod
|
||||
def ensure_dirs(cls):
|
||||
"""确保必要的目录存在"""
|
||||
|
||||
Reference in New Issue
Block a user