Fixed #15889 -- when trying to access to access a serializer that doesn't exist, raise a new SerializerDoesNotExist exception. Thanks to Mathieu Agopian for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16104 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor 2011-04-26 16:49:32 +00:00
parent 1b6670dd59
commit 930371e91b
5 changed files with 42 additions and 2 deletions

View file

@ -38,6 +38,12 @@ This is useful if you want to serialize data directly to a file-like object
out = open("file.xml", "w")
xml_serializer.serialize(SomeModel.objects.all(), stream=out)
.. note::
Calling :func:`~django.core.serializers.get_serializer` with an unknown
:ref:`format <serialization-formats>` will raise a
:class:`~django.core.serializers.SerializerDoesNotExist` exception.
Subset of fields
~~~~~~~~~~~~~~~~