Search code examples
djangoheroku

Did Debug=(os.getenv("DEBUG_VALUE")=='True') but still showing debug info on all devices


I have hide my debug value and security key in env variable. but after accessing a unknown page on my website. it shows debug information. what am I doing wrong?

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.getenv("SECRET_KEY")


# SECURITY WARNING: don't run with debug turned on in production!

DEBUG = (os.getenv("DEBUG_VALUE") == 'True')

DEBUG_VALUE = 'True' in env var.

and I have done heroku config:set Secret_Key="***" and Debug_value='True'


Solution

  • You've set the DEBUG to true. So the Django will show debug information. If you want to disable it, simply set DEBUG_VALUE='False', or any other value (based on your settings), in your Heroku config.