summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMd. Sadaf Noor <sadaf2605@gmail.com>2016-07-03 12:59:47 +0600
committerTim Graham <timograham@gmail.com>2016-07-12 13:46:52 -0400
commite6db7271547087034b1ee2db11676601706e67a3 (patch)
treeb8cf1d464f9fac94237cf2976c6245e95bbe984e
parent065d05e7981b4541205230695a5c02fb9c2df85e (diff)
downloaddjango-e6db7271547087034b1ee2db11676601706e67a3.tar.gz
[1.9.x] Fixed #26831 -- Documented session data must be JSON encodable for JSONSerializer.
Backport of 1f82b857ceb75f2d7a68e79c6a00c30bfe7f1318 from master
-rw-r--r--docs/topics/http/sessions.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt
index aa0ac548c9..69b291ded6 100644
--- a/docs/topics/http/sessions.txt
+++ b/docs/topics/http/sessions.txt
@@ -354,6 +354,9 @@ Bundled serializers
>>> request.session['0']
'bar'
+ Similarly, data that can't be encoded in JSON, such as non-UTF8 bytes like
+ ``'\xd9'`` (which raises :exc:`UnicodeDecodeError`), can't be stored.
+
See the :ref:`custom-serializers` section for more details on limitations
of JSON serialization.