mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Fixed #9279 -- Added ignorenonexistent option to loaddata
Thanks to Roman Gladkov for the initial patch and Simon Charette for review.
This commit is contained in:
parent
7cc4068c44
commit
e7723683dc
7 changed files with 76 additions and 2 deletions
|
@ -130,6 +130,14 @@ trust your data source you could just save the object and move on.
|
|||
|
||||
The Django object itself can be inspected as ``deserialized_object.object``.
|
||||
|
||||
.. versionadded:: 1.5
|
||||
|
||||
If fields in the serialized data do not exist on a model,
|
||||
a ``DeserializationError`` will be raised unless the ``ignorenonexistent``
|
||||
argument is passed in as True::
|
||||
|
||||
serializers.deserialize("xml", data, ignorenonexistent=True)
|
||||
|
||||
.. _serialization-formats:
|
||||
|
||||
Serialization formats
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue