Fixed #24994 -- Documented the expected type of settings.SECRET_KEY.

This commit is contained in:
Tim Graham 2016-12-28 07:36:37 -05:00 committed by GitHub
parent b52c73008a
commit 9e734875fe
1 changed files with 4 additions and 0 deletions

View File

@ -2048,6 +2048,10 @@ unpredictable value.
:djadmin:`django-admin startproject <startproject>` automatically adds a :djadmin:`django-admin startproject <startproject>` automatically adds a
randomly-generated ``SECRET_KEY`` to each new project. 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. Django will refuse to start if :setting:`SECRET_KEY` is not set.
.. warning:: .. warning::