初始化提交,包含完整的邮件系统代码

This commit is contained in:
huangzhenpc
2025-02-25 19:50:00 +08:00
commit aeffc4f8b8
52 changed files with 6673 additions and 0 deletions

25
local_settings.py Normal file
View File

@@ -0,0 +1,25 @@
"""
Windows环境下的本地设置
这个文件包含仅适用于本地Windows开发环境的设置
不会影响生产环境部署
"""
import platform
import logging
# 是否启用Windows特殊设置
IS_WINDOWS = platform.system().lower() == 'windows'
# Windows环境特定配置
if IS_WINDOWS:
# SMTP服务器配置
SMTP_HOST = '127.0.0.1' # 在Windows上使用localhost而不是0.0.0.0
SMTP_PORT = 3825 # 使用高端口避免权限问题
# 日志配置
LOG_LEVEL = 'DEBUG'
# 调试信息
logging.info(f"已加载Windows环境特殊配置: SMTP端口={SMTP_PORT}")
else:
# 非Windows环境下不做特殊处理
pass