Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#13661 closed (fixed)

Code error in serialization docs

Reported by: Jared Forsyth Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Under serialization of natural keys, the following code is given as an example:

serializers.serialize([book1, book2], format='json', indent=2, use_natural_keys=True)

this throws an exception, as the non-kw arguments for serialize are [format, data]. This should be changed to

serializers.serialize('json', [book1, book2], indent=2, use_natural_keys=True)

the attached patch does this.

Attachments (1)

serialize_docs.patch (631 bytes) - added by Jared Forsyth 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by Jared Forsyth

Attachment: serialize_docs.patch added

comment:1 Changed 6 years ago by Alex Gaynor

Has patch: set
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedReady for checkin

comment:2 Changed 6 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [13530]) Fixed #13661 -- Corrected example in the serialization docs. Thanks to jabapyth for the report.

comment:3 Changed 6 years ago by Russell Keith-Magee

(In [13536]) [1.2.X] Fixed #13661 -- Corrected example in the serialization docs. Thanks to jabapyth for the report.

Backport of r13530 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top