Usually I can debug “Internal Server Error” by looking at the server logs. But recently I ran into this error and it left no message in the logs, making it pretty difficult to debug. This command revealed the problem:
python manage.py shell --traceback
the problem was in the settings file. Too early in the chain of events to put a message in the logs.