django DEBUG=False still runs in debug mode

前端 未结 9 671
再見小時候
再見小時候 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:23

    I also experienced this problem as I was loading the debug setting from an environment variable DEBUG = os.environ.get('DEBUG_MODE')).

    This set the DEBUG value as a string, not a boolean.

    To fix this, I hardcoded DEBUG = False in my prod settings file.

提交回复
热议问题