title: How to add a foreign key to the username. Django REST framework
body: <p>During serialization, i noticed that the <code>post_author</code> Foreign Key of the <code>Post</code> model is referencing the id of the creator and thus, i can't display the username of the creator in the REST API, only the post_author id.
  How can i add the username of the post_creator, so that it is readable to other users, when i fetch the data on the frontend?</p>
  <p><strong>models.py</strong> // CustomUser = the Creator of the post.</p>
  <pre><code>class CustomUser(AbstractUser):
      fav_color = models.CharField(blank=True, max_length=120)
  
  class Post(models.Model):
      post_author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, related_name='posts')
      post_title = models.CharField(max_length=200)
      post_body = models.TextField()
      created_date = models.DateTimeField(default=timezone.now)
      published_date = models.DateTimeField(blank=True, null=True)
  
      def __str__(self):
          return self.post_title
  </code></pre>
  <p><strong>views.py</strong></p>
  <pre><code>@api_view(['GET'])
  def post_list(request):
      posts = Post.objects.all()
      serializer = PostSerializer(posts, many=True)
      return Response(serializer.data)
  </code></pre>
  <p><strong>serializers.py</strong> user model and post model serialization</p>
  <pre><code>class CustomUserSerializer(serializers.ModelSerializer):
      &quot;&quot;&quot;
      Currently unused in preference of the below.
      &quot;&quot;&quot;
      email = serializers.EmailField(required=True)
      username = serializers.CharField()
      password = serializers.CharField(min_length=8, write_only=True)
  
      class Meta:
          model = CustomUser
          fields = ('email', 'username', 'password')
          extra_kwargs = {'password': {'write_only': True}}
  
      def create(self, validated_data):
          password = validated_data.pop('password', None)
          # as long as the fields are the same, we can just use this
          instance = self.Meta.model(**validated_data)
          if password is not None:
              instance.set_password(password)
          instance.save()
          return instance
  
  class PostSerializer(serializers.ModelSerializer):
      class Meta:
          model = Post
          fields = '__all__'
  </code></pre>
  <p><strong>single post from the API</strong></p>
  <pre><code>{
      &quot;id&quot;: 1,
      &quot;post_title&quot;: &quot;first_post&quot;,
      &quot;post_body&quot;: &quot;qwe1&quot;,
      &quot;created_date&quot;: &quot;2020-11-17T19:30:55Z&quot;,
      &quot;published_date&quot;: null,
      &quot;post_author&quot;: 1
  },
  </code></pre>