settings: Make SECRET_KEY mandatory.

Technically Django already makes SECRET_KEY mandatory by raising an
ImproperlyConfigured exception when it is not set. We use the
get_mandatory_secret helper here so that we have a narrower type.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li 2022-08-23 19:44:59 -04:00 committed by Tim Abbott
parent c8d5959689
commit c21ae3646a
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ from .configured_settings import (
########################################################################
# Make this unique, and don't share it with anybody.
SECRET_KEY = get_secret("secret_key")
SECRET_KEY = get_mandatory_secret("secret_key")
# A shared secret, used to authenticate different parts of the app to each other.
SHARED_SECRET = get_mandatory_secret("shared_secret")