Danger of DEBUG = True in production

I've read all about Django's DEBUG = True and some of the effects, but it never states WHY you should not use DEBUG = True in production, only that you shouldn't.

I've also read that DEBUG=True remembers every query you make which will increase in memory over time.

Recently though, I've found out you can just change the technical_500.html, technical_404.html (and maybe even the technical_500.txt) in .venv/Lib/site-packages/django/views/templates or the functions themselves in .venv/Lib/site-packages/django/core/handlers/exception.py and get no traceback and data dump whenever you get a 404 or 500 response.

So my question is: is there any real danger in setting DEBUG to True and changing the html's (or functions) mentioned above, if you also have no queries?

P.S I know this may be bad practice, just curious.

Back to Top