  
          return serializer_class
  
      def get_serializer(self, instance=None, data=None, files=None):
          # TODO: add support for files
          # TODO: add support for seperate serializer/deserializer
          serializer_class = self.get_serializer_class()
          context = self.get_serializer_context()
          return serializer_class(instance, data=data, context=context)
  
 
</s> remove                 field.field_from_native(data, field_name, reverted_data)
 </s> add                 if isinstance(field, (FileField, ImageField)):
                    field.field_from_native(files, field_name, reverted_data)
                else:
                    field.field_from_native(data, field_name, reverted_data) </s> remove     def restore_fields(self, data):
 </s> add     def restore_fields(self, data, files):
  
          return serializer_class
  
      def get_serializer(self, instance=None, data=None, files=None):

          # TODO: add support for seperate serializer/deserializer
          serializer_class = self.get_serializer_class()
          context = self.get_serializer_context()
          return serializer_class(instance, data=data, context=context)
  
keep keep keep keep replace keep keep keep keep keep
 Added a FileField and an ImageField (copied from django.forms.fields).
Adjusted generics, mixins and serializers to take a `files` arg where applicable. 
rest_framework/generics.py