Re: Making startproject's settings more 12-factor-y

2020-06-26 Thread Tom Carrick
I do have a use-case where having a default SECRET_KEY makes things much easier - docker. Normally you can't run management commands in a Dockerfile if there's no secret key (and often other things) set, and usually it's best to run collectstatic as a build step. So your options end up being:

Re: Making startproject's settings more 12-factor-y

2020-06-26 Thread Shai Berger
Hello, On Fri, 26 Jun 2020 00:46:02 -0700 (PDT) Florian Apolloner wrote: > 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 >

Re: Making startproject's settings more 12-factor-y

2020-06-26 Thread René Fleschenberg
Hi, On 6/26/20 12:11 PM, René Fleschenberg wrote: > geared towards development (random default value for SECRET_KEY, DEBUG = > False). I meant DEBUG = True here, of course :) -- René Fleschenberg -- You received this message because you are subscribed to the Google Groups "Django developers

Re: Making startproject's settings more 12-factor-y

2020-06-26 Thread René Fleschenberg
Hi Flo, > 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 >

Re: Making startproject's settings more 12-factor-y

2020-06-26 Thread Adam Johnson
> > i dont belive in adding default names to environment variables, they're up > to the user to define > Javier, I think you missed what Florian was talking about. He was suggesting there shouldn't be default *values* for some settings. > I personally rather have no solution in Django itself

Re: Making startproject's settings more 12-factor-y

2020-06-26 Thread Javier Buzzi
Hi Florian, thank for your input, i dont belive in adding default names to environment variables, they're up to the user to define. Nothing will be given by default, you need the SECRET_KEY? `from_env` has no idea what that means, its just another name, so you tell it what it will do with this

Re: Making startproject's settings more 12-factor-y

2020-06-26 Thread Florian Apolloner
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

Re: Making startproject's settings more 12-factor-y

2020-06-26 Thread Javier Buzzi
Hi Carsten, great question! The idea as i see it is: having the least amount of moving parts the better. The trick here is unification, keep a single settings file with 99% of the configuration needed using environment variables/secrets/zookeeper/etc to swap out environment specific options

Re: Making startproject's settings more 12-factor-y

2020-06-26 Thread Carsten Fuchs
Hello, Am 25.06.20 um 19:51 schrieb Kit La Touche: > […] Once we see how this gets used, we can see about passing it a file > instead of `os.environ`, […] This is probably a stupid question, but what is the advantage of this (and env vars) over this: In project_dir/project_dir: settings.py