浏览代码

Fixed #13661 -- Corrected example in the serialization docs. Thanks to jabapyth for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Russell Keith-Magee 14 年之前
父节点
当前提交
92a15532ba
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      docs/topics/serialization.txt

+ 1 - 1
docs/topics/serialization.txt

@@ -338,7 +338,7 @@ example, ``(first name, last name)``. Then, when you call
 ``serializers.serialize()``, you provide a ``use_natural_keys=True``
 argument::
 
-    >>> serializers.serialize([book1, book2], format='json', indent=2, use_natural_keys=True)
+    >>> serializers.serialize('json', [book1, book2], indent=2, use_natural_keys=True)
 
 When ``use_natural_keys=True`` is specified, Django will use the
 ``natural_key()`` method to serialize any reference to objects of the