django DEBUG=False still runs in debug mode

前端 未结 9 665
再見小時候
再見小時候 2021-01-12 21:45

I\'m having issues setting my DEBUG = False on my deployed server (on heroku).

I don\'t believe I\'ve seen this before, but setting debug to false is not

9条回答
  •  走了就别回头了
    2021-01-12 22:05

    If somebody is using python-decouple for env variables and having trouble with DEBUG you have to use this line to retrieve booleans:

    from decouple import config
    DEBUG = config('DEBUG', default=False, cast=bool)
    

提交回复
热议问题