mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Reverting r14994 (at request of SmileyChris) because of some backwards compatibility issues that need to be resolved.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -307,12 +307,6 @@ into the primary key of an actual ``Person`` object.
|
||||
fields will be effectively unique, you can still use those fields
|
||||
as a natural key.
|
||||
|
||||
.. versionchanged:: 1.3
|
||||
|
||||
Deserialization of objects with no primary key will always check whether the
|
||||
model's manager has a ``get_by_natural_key()`` method and if so, use it to
|
||||
populate the deserialized object's primary key.
|
||||
|
||||
Serialization of natural keys
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -359,23 +353,6 @@ use the `--natural` command line flag to generate natural keys.
|
||||
natural keys during serialization, but *not* be able to load those
|
||||
key values, just don't define the ``get_by_natural_key()`` method.
|
||||
|
||||
.. versionchanged:: 1.3
|
||||
|
||||
When ``use_natural_keys=True`` is specified, the primary key is no longer
|
||||
provided in the serialized data of this object since it can be calculated
|
||||
during deserialization::
|
||||
|
||||
...
|
||||
{
|
||||
"model": "store.person",
|
||||
"fields": {
|
||||
"first_name": "Douglas",
|
||||
"last_name": "Adams",
|
||||
"birth_date": "1952-03-11",
|
||||
}
|
||||
}
|
||||
...
|
||||
|
||||
Dependencies during serialization
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user