title: Executing a function as source in Django's Serializer
body: <p>I have the following models:</p>
  
  <pre><code>class A(Model):
      pass
  
  class B(Model):
      a = ForeignKey(A, related_name = 'b')
      b_field = CharField(max_length=64)
  </code></pre>
  
  <p>And I now want to serialize an A object, in which I want to have the first b object. I used to have this code:</p>
  
  <pre><code>class BSerializer(ModelSerializer):
  
      class Meta:
          model = B
          fields = '__all__'
  
  class ASerializer(ModelSerializer):
      b = BSerializer(source='b.first')
  
      class Meta:
          model = A
          fields = '__all__'
  </code></pre>
  
  <p>This used to work, but now my unit tests are failing:</p>
  
  <pre><code>AttributeError: Got AttributeError when attempting to get a value for field `b_field` on serializer `BSerializer`.
  The serializer field might be named incorrectly and not match any attribute or key on the `method` instance.
  Original exception text was: 'function' object has no attribute 'b_field'.
  </code></pre>
  
  <p>Obviously, <code>b.first</code> is a function, and that indeed has not such an attribute. I want the source field however to execute that function. I tried the following line:</p>
  
  <pre><code>    b = BSerializer(source='b.first')
  </code></pre>
  
  <p>But that gave met the following error:</p>
  
  <pre><code>AttributeError: Got AttributeError when attempting to get a value for field `b` on serializer `ASerializer`.
  The serializer field might be named incorrectly and not match any attribute or key on the `A` instance.
  Original exception text was: 'RelatedManager' object has no attribute 'first()'.
  </code></pre>
  
  <ol>
  <li>Has this behavior recently been changed?</li>
  <li>How can I take the first b object inside a to serialize?</li>
  </ol>