Skip to content

Commit

Permalink
[3.1.x] Corrected signing.dumps()/loads() signatures in docs.
Browse files Browse the repository at this point in the history
Backport of 8703680 from master
  • Loading branch information
felixxm committed Jul 31, 2020
1 parent 32cb1fe commit 0e02560
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/topics/signing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,12 @@ and tuples) if you pass in a tuple, you will get a list from
>>> signing.loads(value)
['a', 'b', 'c']

.. function:: dumps(obj, key=None, salt='django.core.signing', compress=False)
.. function:: dumps(obj, key=None, salt='django.core.signing', serializer=JSONSerializer, compress=False)

Returns URL-safe, sha1 signed base64 compressed JSON string. Serialized
object is signed using :class:`~TimestampSigner`.

.. function:: loads(string, key=None, salt='django.core.signing', max_age=None)
.. function:: loads(string, key=None, salt='django.core.signing', serializer=JSONSerializer, max_age=None)

Reverse of ``dumps()``, raises ``BadSignature`` if signature fails.
Checks ``max_age`` (in seconds) if given.

0 comments on commit 0e02560

Please sign in to comment.