[Answered ]-Django error: [Errno 60] Operation timed out

2👍

As you know, the error you were getting is because your logger was set up to send emails whenever you received an error. The problem being that your development environment doesn’t have access to the mail server that this logger relies on.

What happens is django then raises this new error and the actual error gets hidden away.

The actual solution to this is to create a separate settings.py file for development, that way you don’t need to worry about the mail server not being there, nor (I expect) would you really care.

When running runserver you can then specify this settings file with

 runserver --settings=mysettings

For completeness, heres a very simple development settings.py file

from myapp.settings import *

print 'DEV'
DEBUG = True
# INSTALLED_APPS += ['debug_toolbar']
# MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware']
👤Sayse

Leave a comment