      """The name to use for the content override field in the POST form."""
      FORM_PARAM_CONTENT = '_content'
  
      """The name to use for the content-type override field in the POST form."""
      FORM_PARAM_CONTENTTYPE = '_contenttype'
  
      def determine_content(self, request):
          """If the request contains content return a tuple of (content_type, content) otherwise return None.
          Note that content_type may be None if it is unset."""
          if not request.META.get('CONTENT_LENGTH', None) and not request.META.get('TRANSFER_ENCODING', None):
 
</s> remove     FORM_PARAM_CONTENT = '_content'
 </s> add     CONTENT_PARAM = '_content' </s> remove     FORM_PARAM_METHOD = '_method'
 </s> add     METHOD_PARAM = '_method' </s> remove     def get_form(self, data=None):
        """Optionally return a Django Form instance, which may be used for validation
        and/or rendered by an HTML/XHTML emitter.
        
        If data is not None the form will be bound to data."""

        if self.form:
            if data:
                return self.form(data)
            else:
                return self.form()
        return None
  
  
    def cleanup_request(self, data, form_instance):
        """Perform any resource-specific data deserialization and/or validation
        after the initial HTTP content-type deserialization has taken place.
        
        Returns a tuple containing the cleaned up data, and optionally a form bound to that data.
        
        By default this uses form validation to filter the basic input into the required types."""

        if form_instance is None:
            return data
        
        # Default form validation does not check for additional invalid fields
        non_existent_fields = []
        for key in set(data.keys()) - set(form_instance.fields.keys()):
            non_existent_fields.append(key)

        if not form_instance.is_valid() or non_existent_fields:
            if not form_instance.errors and not non_existent_fields:
                # If no data was supplied the errors property will be None
                details = 'No content was supplied'
                
            else:
                # Add standard field errors
                details = dict((key, map(unicode, val)) for (key, val) in form_instance.errors.iteritems() if key != '__all__')

                # Add any non-field errors
                if form_instance.non_field_errors():
                    details['errors'] = form_instance.non_field_errors()

                # Add any non-existent field errors
                for key in non_existent_fields:
                    details[key] = ['This field does not exist']

            # Bail.  Note that we will still serialize this response with the appropriate content type 
            raise ResponseException(status.HTTP_400_BAD_REQUEST, {'detail': details})

        return form_instance.cleaned_data

 </s> add  </s> remove     
    
    def determine_method(self, request):
        """Determine the HTTP method that this request should be treated as.
        Allows PUT and DELETE tunneling via the _method parameter if METHOD_PARAM is set."""
        method = request.method.upper()

        if method == 'POST' and self.METHOD_PARAM and request.POST.has_key(self.METHOD_PARAM):
            method = request.POST[self.METHOD_PARAM].upper()
        
        return method
 </s> add  </s> remove             if self.FORM_PARAM_CONTENTTYPE and request.POST.get(self.FORM_PARAM_CONTENTTYPE, None):
                content_type = request.POST.get(self.FORM_PARAM_CONTENTTYPE, None)
 </s> add             if self.CONTENTTYPE_PARAM and request.POST.get(self.CONTENTTYPE_PARAM, None):
                content_type = request.POST.get(self.CONTENTTYPE_PARAM, None)
    CONTENTTYPE_PARAM = '_contenttype'
      """The name to use for the content override field in the POST form."""
      FORM_PARAM_CONTENT = '_content'
  
      """The name to use for the content-type override field in the POST form."""
    CONTENTTYPE_PARAM = '_contenttype'
  
      def determine_content(self, request):
          """If the request contains content return a tuple of (content_type, content) otherwise return None.
          Note that content_type may be None if it is unset."""
          if not request.META.get('CONTENT_LENGTH', None) and not request.META.get('TRANSFER_ENCODING', None):
keep keep keep keep replace keep keep keep keep keep
 Refactor a bunch of stuff into mixins, more tests 
djangorestframework/content.py