title: Implement get_serializer in generic list view (generics.ListCreateAPIView) in Django REST Framework
body: <p>I have a <code>PageSerializer</code> that inherits from <code>DynamicFieldsModelSerializer</code> which I copied from  the docs (<a href="http://django-rest-framework.org/api-guide/serializers.html#dynamically-modifiying-fields" rel="nofollow">http://django-rest-framework.org/api-guide/serializers.html#dynamically-modifiying-fields</a>). To initialize the serializer from my generic view I implemented <code>get_serializer</code>. For my detail view (which inherits from <code>generics.RetrieveUpdateDestroyAPIView</code>) this works fine, but when I try to initialize my <code>PageSerializer</code> in the list view (which inherits from <code>generics.RetrieveUpdateDestroyAPIView</code>) I get the following error:</p>
  
  <pre><code>'PageList' should either include a 'serializer_class' attribute,
  or use the 'model' attribute as a shortcut for automatically generating
  a serializer class.
  </code></pre>
  
  <p>Here's my get_serializer implementation (which I implemented in the list view as well as in the detail view)</p>
  
  <pre><code>def get_serializer(self, instance=None, data=None, files=None, many=False, partial=False):
      fields = None
      if self.request.method == 'GET':
          query_fields = self.request.QUERY_PARAMS.get("fields", None)
  
          if query_fields:
              fields = tuple(query_fields.split(','))
  
      return PageSerializer(instance=instance, data=data, files=files, many=many, partial=partial, fields=fields) 
  </code></pre>
  
  <p>Judging from the error message get_serializer doesn't seem go get used. Is there a different way to achieve this for a list view? I haven't managed to find any hints as to how get_serializer should be used.</p>