samedi 25 janvier 2020

How do I set my django debug=False and show 404 on the web when there is error?

My settings.py code:

SECRET_KEY = os.environ['SECRET_KEY']
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ.get('DJANGO_DEBUG', '') != 'False'

My .bash_profile:

# Django test deploy
 export SECRET_KEY='67bd6db221e2be1b5b16cb70b79d3bbee8928d9053a8eb32'
 export DJANGO_DEBUG="False"



Aucun commentaire:

Enregistrer un commentaire