Why does the project throw 500 when debug = False?
Why does the project throw a 500 error when debug is set to false?
Around 37:00 into the video, Kenneth shows that without settings.local.debug being set to true, the system throws an error.
Why would the debug setting determine whether or not the site throws an error?
Answers
It's a new setting in Django 1.5. The video was made with 1.4, which led me to chase my tail for a while, too :-D
https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
IIRC, it throws the 500 because it can't match a URL. Normally, this would throw a 404, but as we don't have a 404 template (404.html), it throws a 500 about the missing template. This then throws another 500 because 500.html doesn't exist either.
In DEBUG = True mode, however, it'll just show you the error screen and explain what's going on as best it can. Or, as is the default w/ no routes or anything set up, it just shows the "It Works" page.