What precisely are the functional differences between toggling the DEBUG setting in a settings.py file of a Django app?
I first assumed
One of the main advantages of DEBUG=True is of detailed error pages. Django provides a detailed stacktrace of what went wrong. Which is immensely helpful in debugging. Basically, in DEBUG mode, django remembers every SQL query it executes(Which again makes it totally not suitable for production).
Additionally, if DEBUG=True, host validation is disabled. In other words, if DEBUG=False, ALLOWED_HOSTS needs to be set.