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:

  1. everything works fine on local machine: messages when set debug = false. many of them, being honest.
  2. calling django.core.mail.mail_admins() within ./manage.py shell on production server working fine: emails, sent send_email() within view
  3. i have debug = false set on production server
  4. trying email messing home template missing parentheses , putting assert 0 string home view. getting 500.html rendered alright that.
  5. 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' 

  6. 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

  7. and here admins settings.py: admins = (('xelnod', 'xelnod@gmail.com'),)
  8. i using django 1.7 python 2.7.6
  9. and production server running on '57-ubuntu smp tue jul 15 03:51:08 utc 2014 x86_64 x86_64 x86_64 gnu/linux'
  10. i here: https://stackoverflow.com/questions/1414130/,
    , here: https://stackoverflow.com/questions/17374909/,
    , here: https://stackoverflow.com/questions/19634962/ (so did run sudo 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

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -