Remove fields of a HyperlinkedModelSerializer's ForeignKey based on the base request parameters
<p>At the moment i have:</p>

<pre><code>class PlayerSerializer(serializers.HyperlinkedModelSerializer):
    id = serializers.ReadOnlyField()

    class Meta:
        model = Player

    def __init__(self, *args, **kwargs):
        super(PlayerSerializer, self).__init__(*args, **kwargs)

        self.is_full = self.context['request'].query_params.get('full', False)

        if not self.is_full:
            base_fields = ['nation', 'club', 'slug', 'common_name', 'image', 'position', 'quality', 'overall_rating',
                           'card_att_1', 'card_att_2', 'card_att_3', 'card_att_4', 'card_att_5', 'card_att_6']

            for field in self.fields:
                if field not in base_fields:
                    self.fields.pop(field)

        self.fields['nation'] = NationSerializer(is_full=self.is_full)
        self.fields['league'] = LeagueSerializer(is_full=self.is_full)
        self.fields['club'] = ClubSerializer(is_full=self.is_full)
</code></pre>

<p>Which works fine, but the <code>ClubSerializer</code> has</p>

<pre><code>class ClubSerializer(serializers.HyperlinkedModelSerializer):
    id = serializers.ReadOnlyField()
    league = LeagueSerializer()
</code></pre>

<p>and i want that <code>LeagueSerializer</code> to have the fields based on the value of the requests query params. Would it just be a case of not passing it as a kwarg and doing the <code>self.is_full = self.context['request'].query_params.get('full', False)</code> check on every Serializer individually?</p>