by outotrai · 17y ago · 0 comments
if socket.gethostname() == 'productionserver.com':
DEBUG = False
else:
DEBUG = True
to if socket.gethostname() == 'developmentcomp':
DEBUG = True
else:
DEBUG = False
It's better practice to whitelist one box than to enable DEBUG on all computers but the production server - what if you deploy to another machine without thinking?http://ericholscher.com/blog/2008/nov/15/debugging-django-pr...
Sort of the best of both worlds.