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

2020-06-27 Thread Adam Johnson
>
> There is no reason Django should complain a missing secret key when it
> does not need one at all.


I agree with this. It is an extra step in making really basic apps that
don't use any encryption functionality. IIRC, the "Django needs a secret
key" check has always been a custom check rather than a system check mostly
because it predates the system check framework. I think we could hoist it
to a system check that is triggered only when sessions or other features
that depend on it are installed (although I don't know the exhaustive list).

On Sat, 27 Jun 2020 at 22:39, Florian Apolloner 
wrote:

> Hi Tom,
>
> On Friday, June 26, 2020 at 12:43:19 PM UTC+2 t...@carrick.eu wrote:
>
>> 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.
>>
>
>  I do not see that as an argument for a default SECRET_KEY. Maybe we
> should just defer the check for SECRET_KEY till it is accessed? There is no
> reason Django should complain a missing secret key when it does not need
> one at all.
>
> 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/83630d2b-f51b-4ec3-b92a-838feb452fa1n%40googlegroups.com
> 
> .
>


-- 
Adam

-- 
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/CAMyDDM1Uq8T1Bf1km4Kxar%3D55vCJtyGTmZKDBsPS%3DkcKUYYw-w%40mail.gmail.com.


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

2020-06-27 Thread Florian Apolloner
Hi Tom,

On Friday, June 26, 2020 at 12:43:19 PM UTC+2 t...@carrick.eu wrote:

> 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.
>

 I do not see that as an argument for a default SECRET_KEY. Maybe we should 
just defer the check for SECRET_KEY till it is accessed? There is no reason 
Django should complain a missing secret key when it does not need one at 
all.

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/83630d2b-f51b-4ec3-b92a-838feb452fa1n%40googlegroups.com.