#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)
Change History (4)
by , 15 years ago
Attachment: | serialize_docs.patch added |
---|
comment:1 by , 15 years ago
Has patch: | set |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 14 years ago
Note:
See TracTickets
for help on using tickets.
(In [13530]) Fixed #13661 -- Corrected example in the serialization docs. Thanks to jabapyth for the report.