  into the primary key of an actual ``Person`` object.
  
  Serialization of natural keys
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  So how do you get Django to emit a natural key when serializing an object?
  Firstly, you need to add another method -- this time to the model itself::
 
</s> remove Then, when you call ``serializers.serialize()``, you provide a
``use_natural_keys=True`` argument::
 </s> add         class Meta:
            unique_together = (('first_name', 'last_name'),)

That method should always return a natural key tuple -- in this
example, ``(first name, last name)``. Then, when you call
``serializers.serialize()``, you provide a ``use_natural_keys=True``
argument:: </s> remove Deserialization of natural keys
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It is for these reasons that Django provides `natural keys`. A natural
 </s> add It is for these reasons that Django provides *natural keys*. A natural
.. note::

    Whatever fields you use for a natural key must be able to uniquely
    identify an object. This will usually mean that your model will
    have a uniqueness clause (either unique=True on a single field, or
    ``unique_together`` over multiple fields) for the field or fields
    in your natural key. However, uniqueness doesn't need to be
    enforced at the database level. If you are certain that a set of
    fields will be effectively unique, you can still use those fields
    as a natural key.

  into the primary key of an actual ``Person`` object.
  
.. note::

    Whatever fields you use for a natural key must be able to uniquely
    identify an object. This will usually mean that your model will
    have a uniqueness clause (either unique=True on a single field, or
    ``unique_together`` over multiple fields) for the field or fields
    in your natural key. However, uniqueness doesn't need to be
    enforced at the database level. If you are certain that a set of
    fields will be effectively unique, you can still use those fields
    as a natural key.

  Serialization of natural keys
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  So how do you get Django to emit a natural key when serializing an object?
  Firstly, you need to add another method -- this time to the model itself::
keep add keep keep keep keep keep
 Fixed #13418 -- Added notes on uniqueness requirements for natural keys. Thanks to hunajakippo for the suggestion, and Ramiro Morales for the draft text.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13146 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
docs/topics/serialization.txt