python - Django does not send messages about 500 errors -
okay. not happy posting duplicate question, nothing relevant seems me.
so problem want receive emails containing server error messages (500), , don't.
what know:
- everything works fine on local machine: messages when set
debug = false
. many of them, being honest. - calling
django.core.mail.mail_admins()
within./manage.py shell
on production server working fine: emails, sentsend_email()
within view - i have
debug = false
set on production server - trying email messing home template missing parentheses , putting
assert 0
string home view. getting 500.html rendered alright that. here email settings in settings.py:
email_host = 'smtp.yandex.ru' email_host_user = 'noreply@<project-name>.ru' email_host_password = '<password>' email_port = 587 email_use_tls = true default_from_email = 'noreply@<project-name>.ru' server_email = 'noreply@<project-name>.ru'
- here logging settings in settings.py:
logging = { 'version': 1, 'disable_existing_loggers': false, 'filters': { 'require_debug_false': { '()': 'django.utils.log.requiredebugfalse', } }, 'handlers': { 'mail_admins': { 'level': 'error', 'filters': ['require_debug_false'], 'class': 'django.utils.log.adminemailhandler' } }, 'loggers': { 'django': { 'handlers': ['mail_admins'], 'level': 'error', 'propagate': false, }, } }
i tried changing 'propagate' true, didn't succeed
- and here admins settings.py:
admins = (('xelnod', 'xelnod@gmail.com'),)
- i using django 1.7 python 2.7.6
- and production server running on '57-ubuntu smp tue jul 15 03:51:08 utc 2014 x86_64 x86_64 x86_64 gnu/linux'
- i here: https://stackoverflow.com/questions/1414130/,
, here: https://stackoverflow.com/questions/17374909/,
, here: https://stackoverflow.com/questions/19634962/ (so did runsudo apt-get install sendmail
already),
, in other places — unfortunately, no luck that.
…am missing (i bet stupid…)?
upd: noticed receive email messages concerning static files when test on local — nothing broken template or assertionerror, so, guess, must error level or 500 errors not bad enough django email them… tried setting handler , logger levels info, nothing changed
what's error message when have debug = true
?
and maybe need fix 500 template, because if 1 broken, cannot see 500 error page of 500 error page
Comments
Post a Comment