News for hackers. Stuff that matters.
Re:A guide to organizing settings in Django by abishekg on Friday November 12, 2021 @09:50AM (#29199768)
I use python-decouple with django and it’s solved this pretty elegantly. A dotenv file for local and env variables for production. Isn’t that the 12 factor recommendation?

https://github.com/henriquebastos/python-decouple

Re:A guide to organizing settings in Django by wombatpm on Friday November 12, 2021 @12:16PM (#29201846)
Seconded. I switched from django-environ to python-decouple. Now that python-decouple defers to environment variables over .env files I find that I have our DevOps people spin up containers with secrets configured using their tool de jure while I just have a local .env file. We just make sure our env.sample is up to date with respect to our .env. DevOps folk use that to define environment variables for the container.