Django ignoring DEBUG value when I use os.environ?

In my Django settings I have the following:

on env.py I have the below code:

os.environ.setdefault( "DEBUG", "True" )

On settings.py I have the below code: DEBUG = os.environ.get('DEBUG') == 'True'

However some of the systes are not visbile after deploying but they are perfect on my local server.

Please assist thank you.

I tried changing the DEBUG value to false but nothing changes.

Вернуться на верх