Hi there,

On Thursday, June 25, 2020 at 7:52:31 PM UTC+2 kit....@gmail.com wrote:

> Personally, I think that *at minimum* providing Django-builtin "get from 
> env"  helpers would be great; beyond that, I'd love to have them be 
> included around `DEBUG` and `SECRET_KEY` with the current values as 
> defaults, so they're optional. Once we see how this gets used, we can see 
> about passing it a file instead of `os.environ`, or borrowing other ideas 
> from any of the various supporting projects that have been suggested.
>

I am all for minimal variants, but I do not think this would could it. your 
"get from env" helpers would basically be os.environ.get("SECRET_KEY", 
"secret_default") which does provide much usefulness on it's own imo. So 
even if we started out with a minimal implementation we'd at least have to 
have a good plan on what to do in the future.

And there are plenty more things to consider; for instance I do not agree 
that it makes sense to have "SECRET_KEY" default to a value when missing in 
the env. It is way to easy to type "SECRT_KEY" and never realize that. So 
if "SECRET_KEY" is taken from the environment it should fail loudly if it 
is not present. "DEBUG" is in a similar category there but could default to 
False to be safe.

I personally rather have no solution in Django itself before forcing a 
half-baked one down everyone. Also please note that the bar to add this to 
Django is very high since it can (at least for things like django-environ) 
easily live outside of Django with no realy downside.

Cheers,
Florian

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/68e6a5e0-ea75-43e9-b34a-24f18ced73d4n%40googlegroups.com.

Reply via email to