mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
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:
parent
1b6670dd59
commit
930371e91b
5 changed files with 42 additions and 2 deletions
|
@ -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
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue