Django的settings配置文件
一、邮件配置
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.qq.com' EMAIL_PORT = 25 EMAIL_HOST_USER = '344846258@qq.com' EMAIL_HOST_PASSWORD = '' #授权码 EMAIL_SUBJECT_PREFIX = '我发的邮件' EMAIL_USE_TLS = True #与SMTP服务器通信事,是否启动TLS安全链接
二、日志文件设置
LOGGING = { 'version':1, 'disable_existing_loggers':False, 'handlers':{ 'file':{ 'lever':'DEBUG', 'class':'logging.FileHandler', 'filename': '/home/mysite_debug.log', }, }, 'loggers':{ 'django':{ 'handlers':['file'], 'level':'DEBUG', 'propagate':True, }, }, }