          else:
              into[(self.source or field_name)] = self.from_native(value)
  
  
  class ManyRelatedMixin(object):
      """
      Mixin to convert a related field to a many related field.
      """
      widget = widgets.SelectMultiple
  
      def field_to_native(self, obj, field_name):
          value = getattr(obj, self.source or field_name)
          return [self.to_native(item) for item in value.all()]
  
      def field_from_native(self, data, files, field_name, into):
          if self.read_only:
              return
  
          try:
              # Form data
              value = data.getlist(self.source or field_name)
          except:
              # Non-form data
              value = data.get(self.source or field_name)
          else:
              if value == ['']:
                  value = []
  
          into[field_name] = [self.from_native(item) for item in value]
  
  
  class ManyRelatedField(ManyRelatedMixin, RelatedField):
      """
      Base class for related model managers.
  
      If not overridden, this represents a to-many relationship, using the unicode
      representations of the target, and is read-only.
      """
      pass
  
  
  ### PrimaryKey relationships
  
  class PrimaryKeyRelatedField(RelatedField):
      """
      Represents a to-one relationship as a pk value.
 
</s> remove             value = data[field_name]
 </s> add             if self.many:
                try:
                    # Form data
                    value = data.getlist(field_name)
                    if value == ['']:
                        value = []
                except AttributeError:
                    # Non-form data
                    value = data[field_name]
            else:
                value = data[field_name] </s> remove class ManyHyperlinkedRelatedField(ManyRelatedMixin, HyperlinkedRelatedField):
    """
    Represents a to-many relationship, using hyperlinking.
    """
    form_field_class = forms.MultipleChoiceField


 </s> add 
          else:
              into[(self.source or field_name)] = self.from_native(value)
  
  





































  ### PrimaryKey relationships
  
  class PrimaryKeyRelatedField(RelatedField):
      """
      Represents a to-one relationship as a pk value.
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Starting migration from ManyField to Field(many=True) 
rest_framework/relations.py