title: How to get specific field from serializer of Django rest framework
body: <p>Inside Views.py, I have these code:</p>
  
  <pre><code>class ServerViewSet(viewsets.ViewSet):
  
  def list(self, request):
      servers = Server.objects.all()
      serializer = ServerSerializer(servers, many=True) 
      return Response(serializer.data) # In here, I want to get the server name only
  
  def retrieve(self, request, pk=None):
      servers = get_object_or_404(Server, pk=pk)
      serializer = ServerSerializer(servers)
      return Response(serializer.data) # In here, I want to get the server name and ip address
  </code></pre>
  
  <p>Inside serializers.py, I have these code:</p>
  
  <pre><code>class ServerSerializer(serializers.HyperlinkedModelSerializer):
     class Meta:
          model = Server
          # fields = '__all__'
          fields = ('id', 'name', 'desc', 'ip_address')
  </code></pre>
  
  <p>Is there an official method to filter out the specific field from serializers.data</p>
  
  <p>Sample with parent class</p>
  
  <pre><code>class CommonSerializer(serializers.ModelSerializer):
  def get_field_names(self, *args, **kwargs):
      field_names = self.context.get('fields', None)
      if field_names:
          return field_names
      return super(self).get_field_names(*args, **kwargs)
  
  class ServerSerializer(CommonSerializer):
        class Meta:
          ..............
  
  class WebsiteSerializer(CommonSerializer):
     class Meta:
          ..............
  </code></pre>