Ticket #15886: get_serializer_key_error_doc.diff

File get_serializer_key_error_doc.diff, 578 bytes (added by Mathieu Agopian, 13 years ago)
  • docs/topics/serialization.txt

    diff --git a/docs/topics/serialization.txt b/docs/topics/serialization.txt
    index c8acc85..0f3432d 100644
    a b This is useful if you want to serialize data directly to a file-like object  
    3838    out = open("file.xml", "w")
    3939    xml_serializer.serialize(SomeModel.objects.all(), stream=out)
    4040
     41.. note::
     42   
     43    Calling :func:`~django.core.serializers.get_serializer` with an unknown
     44    :ref:`format <serialization-formats>` will raise a ``KeyError``.
     45
    4146Subset of fields
    4247~~~~~~~~~~~~~~~~
    4348
Back to Top