#32664: Cannot run makemigrations management command without a SECRET_KEY
-------------------------------------+-------------------------------------
Reporter: François Freitag | Owner: François
Type: | Freitag
Cleanup/optimization | Status: closed
Component: Core (Other) | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Michael Manganiello):
Considering Django 3.2
[https://docs.djangoproject.com/en/3.2/releases/3.2/#security release
notes] mention:
> The `SECRET_KEY` setting is now checked for a valid value upon first
access, rather than when settings are first loaded. This enables running
management commands that do not rely on the `SECRET_KEY` without needing
to provide a value. As a consequence of this, calling `configure()`
without providing a valid `SECRET_KEY`, and then going on to access
`settings.SECRET_KEY` will now raise an `ImproperlyConfigured` exception.
Has it been considered to port this fix to the 3.2 branch? As it is today,
`PasswordResetTokenGenerator` initialization breaks the execution of
management commands when trying to follow the recommendation provided by
the release notes.
--
Ticket URL: <https://code.djangoproject.com/ticket/32664#comment:12>
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.3a7cef6b9fe82e55d591560a9c0a9d5a%40djangoproject.com.