title: How to add serializers.RelatedField() to Meta class fields in django rest framework
body: <p>I have a simple API for a football game. I am using Django 2.0 and Django REST framework. I have these two models for <code>Team</code> and <code>Player</code></p>
  
  <pre><code>class Team(models.Model):
      name = models.CharField(max_length=60)
      budget = models.FloatField(default=100.0) # Millions? 114.53 M
  
      user = models.OneToOneField(User, unique=True, on_delete=models.CASCADE)
      competitions = models.ManyToManyField(Season)
  
      def __str__(self):
          return self.name
  
  class Player(models.Model):
      name = models.CharField(max_length=50)
      age = models.IntegerField(null=True)
      inMarket = models.BooleanField(default=False)
      lastInMarket = models.DateTimeField(null=True)
  
      team = models.ForeignKey(Team, null=True, on_delete=models.DO_NOTHING, related_name='team')
  </code></pre>
  
  <p>As far as I've read, this is the properly way of defining OneToMany relations, this is, a <code>Team</code> has many <code>Players</code>. Now, in the other hand, I want to display an <code>APIView</code> for a concrete team to show all the information of the team including the information of players. I have these two <code>Serializers</code>:</p>
  
  <pre><code>class PlayersSerializer(serializers.ModelSerializer):
      team = serializers.RelatedField(read_only=True)
  
      class Meta:
          model = Player
          fields = ('id', 'name', 'age', 'position', 'team')
  
      def create(self, validated_data):
          pass
  
      def update(self, instance, validated_data):
          pass
  
  
  class TeamSerializer(serializers.ModelSerializer):
      players = serializers.RelatedField(read_only=True, many=True)
  
      class Meta:
          model = Team
          fields = ('name', 'user', 'competitions')
  
      def create(self, validated_data):
          return Team.objects.create(**validated_data)
  
      def update(self, instance, validated_data):
          instance.players = validated_data
          return instance
  </code></pre>
  
  <p>This is the best way I've found so far of <em>retrieving</em> the players of the team. However, I'm not sure if it is the right way. Anyway, I can't add <code>players</code> to <code>fields</code> because <code>Team</code> model has no players attribute (An exception is raised). How could I fix this somehow? I'm kind of lost</p>