                      flatdata[key] = attr_value
                  else:
                      flatdata[key] = [attr_value]
              else:
                  if isinstance(attr_value, list):
                      flatdata[key] = attr_value[0]
                  else:
                      flatdata[key] = attr_value 
          return flatdata
  
      def is_a_list(self, key, val):
 
</s> remove         for key, attr_value in data.items():
            if self.is_a_list(key):
                if isinstance(attr_value, list):
                    flatdata[key] = attr_value
                else:
                    flatdata[key] = [attr_value]
 </s> add         for key, val_list in data.items():
            if self.is_a_list(key, val_list):
                flatdata[key] = val_list </s> remove                     flatdata[key] = attr_value 
 </s> add                     # If the list is empty, but the parameter is not a list,
                    # we strip this parameter.
                    data.pop(key) </s> remove     def is_a_list(self, key, val):
 </s> add     def is_a_list(self, key, val_list): </s> remove                 request.META['CONTENT_TYPE'] = content_type
 </s> add                 request.META['CONTENT_TYPE'] = content_type # TODO : VERY BAD, avoid modifying original request.
                if val_list:
                    flatdata[key] = val_list[0]
                      flatdata[key] = attr_value
                  else:
                      flatdata[key] = [attr_value]
              else:
                if val_list:
                    flatdata[key] = val_list[0]
                if val_list:
                    flatdata[key] = val_list[0]
                  else:
                      flatdata[key] = attr_value 
          return flatdata
  
      def is_a_list(self, key, val):
keep keep keep keep replace replace keep keep keep keep keep
 documentation + tests + debugging for formparsers 
djangorestframework/parsers.py