Allow to set fallback secret keys (#4482)

This commit is contained in:
Raphael Michel
2024-10-07 16:31:24 +02:00
committed by GitHub
parent 1334a570e4
commit cdc5401dc2
2 changed files with 11 additions and 0 deletions

View File

@@ -94,6 +94,13 @@ else:
pass # os.chown is not available on Windows
f.write(SECRET_KEY)
SECRET_KEY_FALLBACKS = []
for i in range(10):
if config.has_option('django', f'secret_fallback{i}'):
SECRET_KEY_FALLBACKS.append(config.get('django', f'secret_fallback{i}'))
# Adjustable settings
debug_fallback = "runserver" in sys.argv or "runserver_plus" in sys.argv