title: Writable nested serializer in django-rest-framework?
body: <p>My design is as following about Django ModelSerializer.
  There are model A and model B. Model B has a foreign key field of Model A. For some reasons, I can not use the primary key directly to serialize Model B. As my thought, what I need is to serialize two other fields(unique together in Model A).</p>
  
  <p>And I see the SlugRelatedField must be used for one slug field. 
  I searched there is a NaturalKeyField can support NaturalKeyField. But it looks like it is superseeded by django-rest-framework. But I checked the django-rest-framework, there is no such field at all.
  Can anyone help?? What should I do?</p>
  
  <p>The code is as following.
  Model A</p>
  
  <pre><code>class AssetModel(models.Model):
      org = models.ForeignKey(Org, related_name='models')
      name = models.CharField(max_length=128)
      model_type = models.SmallIntegerField(default = 3,choices = MODEL_TYPE )
      directory = models.CharField(max_length = 128)
      ...
      class Meta:
          unique_together = ('org', 'name',)
  </code></pre>
  
  <p>Model B</p>
  
  <pre><code>class Dataitem(models.Model):
      mod = models.ForeignKey(AssetModel, related_name='dataitems')
      name = models.CharField(max_length=128)
      data_type = models.SmallIntegerField(default =0,choices = DATAITEM_DATATYPE)
      ...
  </code></pre>
  
  <p>Serializer of model A</p>
  
  <pre><code>class AssetModelSerializer(serializers.ModelSerializer):
      org =  serializers.SlugRelatedField(queryset=Org.objects.all(), slug_field='name')
      class Meta:
          model = AssetModel
          fields = ('org', 'name', 'model_type',..
  </code></pre>
  
  <p>Serializer of model B</p>
  
  <pre><code>class DataitemSerializer(serializers.ModelSerializer):
      class Meta:
          model = Dataitem
          fields = ('mod', 'name','data_type'...)
  </code></pre>
  
  <p>The primary key of Model A is just a id Django auto added. When serialize the model B, I need to get the org and name of model A. Both read and write are needed.</p>