#32664: Cannot run makemigrations management command without a SECRET_KEY
-------------------------------------+-------------------------------------
     Reporter:  François Freitag     |                    Owner:  François
         Type:                       |  Freitag
  Cleanup/optimization               |                   Status:  new
    Component:  Core (Other)         |                  Version:  dev
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by François Freitag):

 > We cannot not guarantee that makemigrations or any other built-in
 command will work in the future without a SECRET_KEY.

 That’s true. I’m not asking for all management commands to work without a
 `SECRET_KEY`, but for the commands to fail only when the `SECRET_KEY` is
 accessed.

 My goal is to avoid defining a `SECRET_KEY` in environments that do not
 need it. That’s the same goal as #29324 and corresponding release note
 mention https://docs.djangoproject.com/en/3.2/releases/3.2/#security:

 > running management commands that do not rely on the SECRET_KEY without
 needing to provide a value.

 My project (the same as Jon in #29324) works around the limitation by
 generating a random string for `SECRET_KEY` when none is available. It is
 annoying to maintain logic to create values for unused settings.

 A regression in this area isn’t a big deal. IMO, maintaining it on a best-
 effort basis is sufficient, and can help simplifying the running on
 management commands for other projects.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32664#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/073.6d3e15731194867f6fb3bd0bd82c3646%40djangoproject.com.

Reply via email to