Question on Debug = True/False

Ok. So I had posted a few days ago saying that I had a problem with pushing to Heroku at the end and getting server errors. After a lot of messing around, I realized that when I changed the "Debug" flag in local.py to False, it would no longer run locally. I obviously changed it back to True (even though I think we were supposed to change it to False in the tutorial).

Well, I decided to try the same with the base.py "Debug" flag and change it to True as well. Now it works both locally and on Heroku. My question is this: What is the significance of this and will it hurt me later on?

Sorry You must be a logged in, registered user to answer a question.

Answers

Initially I did the same thing - I set DEBUG to True in base.py and local.py and just run with it. I've completed lesson two like that without many problems (they were mostly related to the database and not this debug setting I think). However I'm pretty sure the solution I posted in that other question (http://gettingstartedwithdjango.com/questions/1/heroku-trouble-at-the-end/) is the right one. Check out https://docs.djangoproject.com/en/1.5/ref/settings/ and section on DEBUG for details. It says that you need to properly set the ALLOWED_HOSTS setting and that you shouldn't deploy a site with DEBUG turned on for security reasons. I hope this helps.

Thanks for the help! I figured that there was probably a reason that DEBUG shouldn't be turned on but I wasn't sure. Hopefully I can get this fixed
Nate Wilson on