views:

27

answers:

1

In my settings.py file I've added the following lines to enable logging. But unexpectedly now my project throws "500 Internal Server Error". Any ideas why ?

import logging
logging.basicConfig(
    level=logging.DEBUG,
    format='%(asctime)s %(levelname)s %(message)s',
    filename=os.path.join(rootdir, 'django.log'),
    filemode='a+')
A: 

Try "python ./manage.py shell" and see what you get. Since it runs settings.py before giving you a prompt you should see some standard Python error messages. There are many times when Django errors are easier to debug from the command line than through a browser->server->mod_python->django chain (or whatever).

Peter Rowell