Django

Code

Ticket #6524 (closed: fixed)

Opened 10 months ago

Last modified 10 months ago

[patch] bug in serialization documentation example code

Reported by: Matthew Flanagan <mattimustang@gmail.com> Assigned to: nobody
Milestone: Component: Documentation
Version: SVN Keywords: serialization
Cc: Triage Stage: Accepted
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Hi,

Here is a small inline patch for the doc bug:

Index: docs/serialization.txt
===================================================================
--- docs/serialization.txt      (revision 7049)
+++ docs/serialization.txt      (working copy)
@@ -88,7 +88,7 @@

     for deserialized_object in serializers.deserialize("xml", data):
         if object_should_be_saved(deserialized_object):
-            obj.save()
+            deserialized_object.save()

 In other words, the usual use is to examine the deserialized objects to make
 sure that they are "appropriate" for saving before doing so.  Of course, if you trust your data source you could just save the object and move on.

Attachments

Change History

02/04/08 22:03:24 changed by GabrielRoss

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

02/18/08 17:43:12 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [7130]) Fixed a few errors in the documentation. Thanks, Matthew Flanagan, panni@fragstore.net and adamv.

Fixed #6411, #6426, #6524, #6555.


Add/Change #6524 ([patch] bug in serialization documentation example code)




Change Properties
Action