4 ms·
This is how I do my debug, seems a little more compact :) DEBUG = socket.gethostname() != 'your.domain.com' I'd also suggest you add ADMINS = (
by kilian 16y ago
This is how I do my debug, seems a little more compact :)
DEBUG = socket.gethostname() != 'your.domain.com'
I'd also suggest you add
ADMINS = (
('name', 'your-email@domain.com'),
)
and
# Email-settings
SERVER_EMAIL = 'your-email@domain.com'
if DEBUG:
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
else:
EMAIL_HOST = 'localhost'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
So you get notified of any errors via e-mail when debug is off.