heroku / django-heroku

[DEPRECATED] Do not use! See https://github.com/heroku/django-heroku/issues/56
BSD 3-Clause "New" or "Revised" License
459 stars 142 forks source link

Add Settings Configuration for DEBUG #13

Open AndyLPK247 opened 6 years ago

AndyLPK247 commented 6 years ago

NEW FEATURE REQUEST

The settings function reads in config vars like SECRET_KEY and DATABASE_URL. It would be really helpful if it could also read DEBUG as a config var. That way, DEBUG could be "True" in the local .env file or in development environments, while it could be "False" in staging and production environments. It makes sense to control this value as a config var, rather than hard-coding it in the settings.py file. (Of course, there should also be documentation strongly advising programmers not to set DEBUG=True in production.)

arocks commented 5 years ago

I support this, would recommend something like:

DEBUG = bool(os.environ.get("DEBUG", False))