summaryrefslogtreecommitdiff
path: root/docs/ref/settings.txt
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-12-28 07:36:37 -0500
committerGitHub <noreply@github.com>2016-12-28 07:36:37 -0500
commit9e734875fe7fb078aa4ef0e84578aa7e641f5563 (patch)
tree0222f228731207f6a660d6fef1f24fbfdca6be18 /docs/ref/settings.txt
parentb52c73008a9d67e9ddbb841872dc15cdd3d6ee01 (diff)
Fixed #24994 -- Documented the expected type of settings.SECRET_KEY.
Diffstat (limited to 'docs/ref/settings.txt')
-rw-r--r--docs/ref/settings.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 10f60b3b2e..e9c333081a 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -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::