News for hackers. Stuff that matters.
Re:A guide to organizing settings in Django by whalesalad on Friday November 12, 2021 @07:41AM (#29198730)
That’s how I do it. .env files are terrible if you’re using them with a language specific loader. The entire point of env is that it’s an abstraction you can manipulate externally. You can setup the env, then launch the program. It allows for runtime changes.

https://whalesalad.com/blog/doing-python-configuration-right

You can do it right without packages or external dependencies.

Re:A guide to organizing settings in Django by pphysch on Friday November 12, 2021 @10:27AM (#29200162)
Scrolling through the thread, this is my favorite so far.

I like that it avoids counterproductive dependencies for loading a dotfile within the app. This is an operation that should be done at the same level as launches the Python interpreter, and Python should then complain if required envs are not set.