Debugging Django when no Debug info is displayed | Django
I'm serving an app through IIS6. An error is occurring preventing the app from working, I am not 100% sure what it might be.
I believe the following is generated by python, but I am not entirely sure.
"A server error has occurred. Please contact the administrator"
Any ideas on f开发者_如何学运维iguring out what is actually going on?
It looks more like web server error (500?).
Is debugging enabled? You should be able to see exception message and traceback. Also, check web server error log and define settings.ADMINS. This is usefull in production when debugging is disabled:
When DEBUG=False and a view raises an exception, Django will e-mail these people with the full exception information.
http://docs.python.org/library/logging.html#simple-examples
import logging
logging.debug('foobar')
精彩评论