I'm getting server error(500) after I set DEBUG to False, both in local and after deploying to Heroku. Everything is Ok when DEBUG mode is True.
Thanks for help
I'm getting server error(500) after I set DEBUG to False, both in local and after deploying to Heroku. Everything is Ok when DEBUG mode is True.
Thanks for help
I think you need to configure your logging and mail correctly so you see what exactly is happening.
https://docs.djangoproject.com/en/3.0/topics/email/
Mail is sent using the SMTP host and port specified in the EMAIL_HOST and EMAIL_PORT settings. The EMAIL_HOST_USER and EMAIL_HOST_PASSWORD settings, if set, are used to authenticate to the SMTP server, and the EMAIL_USE_TLS and EMAIL_USE_SSL settings control whether a secure connection is used.
https://docs.djangoproject.com/en/3.0/topics/logging/#django.utils.log.RequireDebugFalse
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse',
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
}
},
Thanks for the answers, I have found the solution, the issue was with html template {% static %} tag.
I had such line
but the closing %} must be in front of type