              'Relational fields should not provide a `queryset` argument, '
              'when setting read_only=`True`.'
          )
          kwargs.pop('many', None)
          super(RelatedField, self).__init__(**kwargs)
  
      def __new__(cls, *args, **kwargs):
          # We override this method in order to automagically create
          # `ManyRelatedField` classes instead when `many=True` is set.
          if kwargs.pop('many', False):
 
</s> remove                 many_to_many = PrimaryKeyRelatedField(many=True, queryset=ManyToManyTargetModel.objects.all())
 </s> add                 many_to_many = PrimaryKeyRelatedField(allow_empty=False, many=True, queryset=ManyToManyTargetModel.objects.all()) </s> remove                 many_to_many = HyperlinkedRelatedField(many=True, queryset=ManyToManyTargetModel.objects.all(), view_name='manytomanytargetmodel-detail')
 </s> add                 many_to_many = HyperlinkedRelatedField(allow_empty=False, many=True, queryset=ManyToManyTargetModel.objects.all(), view_name='manytomanytargetmodel-detail')
        kwargs.pop('allow_empty', None)
              'Relational fields should not provide a `queryset` argument, '
              'when setting read_only=`True`.'
          )
          kwargs.pop('many', None)
        kwargs.pop('allow_empty', None)
          super(RelatedField, self).__init__(**kwargs)
  
      def __new__(cls, *args, **kwargs):
          # We override this method in order to automagically create
          # `ManyRelatedField` classes instead when `many=True` is set.
          if kwargs.pop('many', False):
keep keep keep add keep keep keep keep keep keep
 Respect blank on many to many, and set allow_empty=False if it is not present. Closes #2804. 
rest_framework/relations.py