      def get_serializer(self, data=None, files=None, instance=None, kwargs=None):
          # TODO: add support for files
          # TODO: add support for seperate serializer/deserializer
          serializer_class = self.serializer_class
          kwargs = kwargs or {}
  
          if serializer_class is None:
              class DefaultSerializer(self.model_serializer_class):
                  class Meta:
                      model = self.model
 
</s> remove     def get_serializer(self, data=None, files=None, instance=None, kwargs=None):
        # TODO: add support for files
        # TODO: add support for seperate serializer/deserializer
 </s> add     def get_serializer_class(self):
        """
        Return the class to use for the serializer.
        Use `self.serializer_class`, falling back to constructing a
        model serializer class from `self.model_serializer_class`
        """ </s> remove             'format': self.kwargs.get('format', None)
 </s> add             'format': self.format,
            'view': self </s> remove     def get_pagination_serializer(self, page=None):
        serializer_class = self.pagination_serializer_class
 </s> add     def get_serializer(self, data=None, files=None, instance=None):
        # TODO: add support for files
        # TODO: add support for seperate serializer/deserializer
        serializer_class = self.get_serializer_class() </s> remove         context = self.get_serializer_context()
        return serializer_class(data, instance=instance, context=context, **kwargs)
 </s> add         return serializer_class </s> remove     pass
 </s> add     pagination_serializer_class = api_settings.PAGINATION_SERIALIZER
    paginate_by = api_settings.PAGINATE_BY

    def get_pagination_serializer_class(self):
        """
        Return the class to use for the pagination serializer.
        """
        class SerializerClass(self.pagination_serializer_class):
            class Meta:
                object_serializer_class = self.get_serializer_class()

        return SerializerClass

    def get_pagination_serializer(self, page=None):
        pagination_serializer_class = self.get_pagination_serializer_class()
        context = self.get_serializer_context()
        return pagination_serializer_class(instance=page, context=context)
      def get_serializer(self, data=None, files=None, instance=None, kwargs=None):
          # TODO: add support for files
          # TODO: add support for seperate serializer/deserializer
          serializer_class = self.serializer_class

  
          if serializer_class is None:
              class DefaultSerializer(self.model_serializer_class):
                  class Meta:
                      model = self.model
keep keep keep keep replace keep keep keep keep keep
 Expand pagination support, add docs 
rest_framework/generics.py