title: Django Rest Framework - Nested Serialization not working as expected
body: <p>While using Django-REST-Framework, I am not able to display selected fields in a nested serialized object. </p>
  
  <p>I am correctly able to serialize the entirety of the <code>Address</code> model, but I want only a few fields from <code>Address</code>, nested in my serialized <code>Outlet</code>. There is a </p>
  
  <blockquote>
    <p>Got AttributeError when attempting to get a value for field <code>outlet_address</code> on serializer <code>OutletSerializer</code>.
    The serializer field might be named incorrectly and not match any attribute or key on the <code>Outlet</code> instance.
    Original exception text was: 'Outlet' object has no attribute 'outlet_address'.</p>
  </blockquote>
  
  <p><strong>api_v1/models.py</strong></p>
  
  <pre><code>class Address(models.Model):
      building = models.CharField(_("shop number, floor &amp; building"), max_length=128)
      street = models.CharField(_("street"), max_length=128, blank=True)
      area = models.ManyToManyField(Area, related_name='address')
      city = models.ForeignKey(City, related_name='address')
      pin_code = models.CharField(_("PIN code"), max_length=6, default="")
  
      def __unicode__(self):
          return self.building + " " + self.street + " ..."
  
  
  class Outlet(models.Model):
      name = models.CharField(max_length=100, blank=True)
      chain = models.ForeignKey(Chain, related_name='outlet', blank=True, null=True)
      organization = models.ForeignKey(Organization, blank=True, null=True)
      address = models.OneToOneField(Address, related_name='outlet_address')
      thumbnail = AjaxImageField(upload_to='thumbnails',
                                 max_height=200,  #optional
                                 max_width=200,  # optional
                                 crop=True)  # optional
      date_created = models.DateTimeField(_('date created'), default=timezone.now)
  
      def __unicode__(self):
          return self.name
  </code></pre>
  
  <p><strong>api_v1/serializers.py</strong></p>
  
  <pre><code>from rest_framework import serializers
  from api_v1.models import Outlet, Address
  
  class AddressSerializer(serializers.ModelSerializer):
      #address_area = AreaSerializer(many=False)
  
      class Meta:
          model = Address
          fields = ('building', 'street',)
          depth = 3
  
  
  class OutletSerializer(serializers.ModelSerializer):
      outlet_address = AddressSerializer(many=False)
      #area = serializers.CharField(source='address.area') #multiple levels of nesting?
  
      class Meta:
          model = Outlet
          fields = ('id', 'name', 'thumbnail', 'outlet_address')
          # fields = ('id', 'name', 'thumbnail', 'address') # this works
          depth = 3
  </code></pre>
  
  <p>At this point, it is unable to find the outlet_address attribute in the Outlet model while I expect it should be able to in the serializer. </p>
  
  <blockquote>
    <p>Got AttributeError when attempting to get a value for field
    <code>outlet_address</code> on serializer <code>OutletSerializer</code>. The serializer
    field might be named incorrectly and not match any attribute or key on
    the <code>Outlet</code> instance. Original exception text was: 'Outlet' object
    has no attribute 'outlet_address'.</p>
  </blockquote>
  
  <p>As described on other answers, I have tried:</p>
  
  <ol>
  <li>adding <code>many=</code> to the ModelSerializer</li>
  <li>adding <code>related_name=</code> to all Models</li>
  </ol>