              model_field=None,
              related_model=related,
              to_many=True,
              has_through_model=(
                  (getattr(relation.field.rel, 'through', None) is not None) and
                  not relation.field.rel.through._meta.auto_created
              )
          )
 
</s>
            # manytomany do not have to_fields
            to_field=None,
              model_field=None,
              related_model=related,
              to_many=True,
            # manytomany do not have to_fields
            to_field=None,
              has_through_model=(
                  (getattr(relation.field.rel, 'through', None) is not None) and
                  not relation.field.rel.through._meta.auto_created
              )
          )
keep keep add keep keep keep keep keep
 Added support for the to_field on ForeignKey fields
rest_framework/utils/model_meta.py