summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorminusf <minusf@gmail.com>2018-11-09 13:26:46 +0100
committerTim Graham <timograham@gmail.com>2018-11-09 07:27:03 -0500
commit5d0de5852aebca25834848ec073dedd123d1d77a (patch)
tree430ea3d0937c2ba34b4d6bee36f99d43b01504e9
parentec283436288f852b7a576f23859628b4afc124c8 (diff)
[2.1.x] Fixed signing.dumps() example for Python 3.
Backport of 545dae24fd01a9165d869a13aad04f5b88d626c1 from master
-rw-r--r--django/core/signing.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/signing.py b/django/core/signing.py
index 1a55bcda03..1e92838596 100644
--- a/django/core/signing.py
+++ b/django/core/signing.py
@@ -23,7 +23,7 @@ You can optionally compress the JSON prior to base64 encoding it to save
space, using the compress=True argument. This checks if compression actually
helps and only applies compression if the result is a shorter string:
->>> signing.dumps(range(1, 20), compress=True)
+>>> signing.dumps(list(range(1, 20)), compress=True)
'.eJwFwcERACAIwLCF-rCiILN47r-GyZVJsNgkxaFxoDgxcOHGxMKD_T7vhAml:1QaUaL:BA0thEZrp4FQVXIXuOvYJtLJSrQ'
The fact that the string is compressed is signalled by the prefixed '.' at the