wsvincent/djangoforprofessionals

Chapter 17. Possibly missing getting ENVIRONMENT from environmental variables

Closed this issue · 1 comments

Not sure if I just missed it somewhere in the text, it seems to me that we have start to set the ENVIRONMENT in docker-compose.yml and docker-compose-prod.yml on pages 324 and 325 but never added the following line in the book text:

ENVIRONMENT = os.environ.get('ENVIRONMENT', default='development')

Nice catch. We didn't add that, but should :) And actually, upon further thought, I think setting the default to production is a better choice. Better to not let local development settings leak out into a deployment rather than the other way around.

I've updated the code here and the book text to reflect the change!