              if isinstance(field, forbidden_field_types):
                  return [
                      checks.Error(
                          "The value of '%s' refers to '%s', which must not be a DateTimeField, "
                          "ForeignKey or ManyToManyField." % (label, field_name),
                          obj=obj.__class__,
                          id='admin.E028',
                      )
                  ]
              else:
 
</s> remove             if isinstance(field, forbidden_field_types):
 </s> add             if field.many_to_many or isinstance(field, (models.DateTimeField, models.ForeignKey)): </s> remove                         "The value of '%s' must not be a ManyToManyField." % label,
 </s> add                         "The value of '%s' must not be a many-to-many field." % label, </s> remove                             "The value of '%s' cannot include the ManyToManyField '%s', "
 </s> add                             "The value of '%s' cannot include the many-to-many field '%s' " </s> remove             elif isinstance(field, models.ManyToManyField):
 </s> add             elif getattr(field, 'many_to_many', False): </s> remove                 if (isinstance(field, models.ManyToManyField) and
                        not field.remote_field.through._meta.auto_created):
 </s> add                 if field.many_to_many and not field.remote_field.through._meta.auto_created:
                        "a foreign key, or a many-to-many field." % (label, field_name),
              if isinstance(field, forbidden_field_types):
                  return [
                      checks.Error(
                          "The value of '%s' refers to '%s', which must not be a DateTimeField, "
                        "a foreign key, or a many-to-many field." % (label, field_name),
                          obj=obj.__class__,
                          id='admin.E028',
                      )
                  ]
              else:
keep keep keep keep replace keep keep keep keep keep
 Refs #24227 -- Replaced M2M isinstance checks by field.many_to_many

Thanks Markus Holtermann, Collin Anderson and Tim Graham for the reviews. 
django/contrib/admin/checks.py