Django的生产服务器 - Django的不是500错误的情况下发送邮件到ADMINS [英] django production server - Django not sending mail in 500 error case to ADMINS

查看:523
本文介绍了Django的生产服务器 - Django的不是500错误的情况下发送邮件到ADMINS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在服务器上部署的最后Django项目,现在它的工作,但一旦我去 /管理/ ,我得到500页而不是通知。

i have deployed django project finally on server and now it is working, but once i go to /admin/, i am getting 500 page but not notification.

这是我在settings_prod.py

this is what i have in settings_prod.py

from settings import *
DEBUG = TEMPLATE_DEBUG = False    
SERVER_EMAIL='my_mail@mail.com'    
DEFAULT_FROM_EMAIL='my_mail@mail.com'    
ADMINS = (
    (u'me', 'my_mail@mail.com'),
)    
MANAGERS = ADMINS

我在做什么错了?

what am i doing wrong?

我需要这方面的任何SMTP设置?我以为,这是服务器的邮件,所以服务器已经设置的一切发送错误邮件。

Do i need any SMTP setups for this? i thought, this is server mailing, so server has already everything setup to send error mails.

推荐答案

OK,我通过安装的sendmail 在服务器上得到了它。对于那些谁遇到同样的问题。

OK, I got it by installing sendmail on server. for those who encounters the same problem.

apt-get install sendmail

我在Debian的。

I am in Debian.

好运气

这篇关于Django的生产服务器 - Django的不是500错误的情况下发送邮件到ADMINS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆