Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#13661 closed (fixed)

Code error in serialization docs

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

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 14 years ago.

Download all attachments as: .zip

Change History (4)

by Jared Forsyth, 14 years ago

Attachment: serialize_docs.patch added

comment:1 by Alex Gaynor, 14 years ago

Has patch: set
Triage Stage: UnreviewedReady for checkin

comment:2 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

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

comment:3 by Russell Keith-Magee, 14 years ago

(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