mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #24994 -- Documented the expected type of settings.SECRET_KEY.
This commit is contained in:
parent
b52c73008a
commit
9e734875fe
1 changed files with 4 additions and 0 deletions
|
@ -2048,6 +2048,10 @@ unpredictable value.
|
|||
:djadmin:`django-admin startproject <startproject>` automatically adds a
|
||||
randomly-generated ``SECRET_KEY`` to each new project.
|
||||
|
||||
Uses of the key shouldn't assume that it's text or bytes. Every use should go
|
||||
through :func:`~django.utils.encoding.force_text` or
|
||||
:func:`~django.utils.encoding.force_bytes` to convert it to the desired type.
|
||||
|
||||
Django will refuse to start if :setting:`SECRET_KEY` is not set.
|
||||
|
||||
.. warning::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue