django-deployment

How are environment variables accessed from ".env" file if Django project deployed to AWS from Github?

How are environment variables accessed from ".env" file if Django project deployed to AWS from Github? Question: I have a Django project deployed on AWS EBS from a Github repo. My secret key is kept on a .env file. I’ve included the following: settings.py from decouple import config "SECRET_KEY" = config("MY_SECRET_KEY") requirements.txt python-decouple==3.7 .env MY_SECRET_KEY …

Total answers: 1

Django. DEBUG in production

Django. DEBUG in production Question: I’m writing my first real project in Django and I have a problem with properly setting DEBUG in development and production. In my settings.py project file I have: # SECURITY WARNING: don’t run with debug turned on in production! DEBUG = os.environ.get(‘DJANGO_DEBUG’, ‘True’) == ‘True’ So I expect that it …

Total answers: 2