          except FieldDoesNotExist:
              return refer_to_missing_field(field=field_name, option=label,
                                            model=model, obj=obj, id='admin.E002')
          else:
              if not isinstance(field, (models.ForeignKey, models.ManyToManyField)):
                  return must_be('a ForeignKey or ManyToManyField',
                                 option=label, obj=obj, id='admin.E003')
              else:
                  return []
  
      def _check_fields(self, obj):
 
</s> remove             if not isinstance(field, models.ManyToManyField):
                return must_be('a ManyToManyField', option=label, obj=obj, id='admin.E020')
 </s> add             if not field.many_to_many:
                return must_be('a many-to-many field', option=label, obj=obj, id='admin.E020') </s> remove             if isinstance(field, forbidden_field_types):
 </s> add             if field.many_to_many or isinstance(field, (models.DateTimeField, models.ForeignKey)): </s> remove         forbidden_field_types = (
            models.DateTimeField,
            models.ForeignKey,
            models.ManyToManyField
        )

 </s> add  </s> remove         if not isinstance(field, (models.ForeignKey, models.ManyToManyField)):
 </s> add         if not field.many_to_many and not isinstance(field, (models.ForeignKey)): </s> remove                     "CurrentSiteManager cannot use '%s.%s' as it is not a ForeignKey or ManyToManyField." % (
 </s> add                     "CurrentSiteManager cannot use '%s.%s' as it is not a foreign key or a many-to-many field." % (
            if not field.many_to_many and not isinstance(field, models.ForeignKey):
                return must_be('a foreign key or a many-to-many field',
          except FieldDoesNotExist:
              return refer_to_missing_field(field=field_name, option=label,
                                            model=model, obj=obj, id='admin.E002')
          else:
            if not field.many_to_many and not isinstance(field, models.ForeignKey):
                return must_be('a foreign key or a many-to-many field',
            if not field.many_to_many and not isinstance(field, models.ForeignKey):
                return must_be('a foreign key or a many-to-many field',
                                 option=label, obj=obj, id='admin.E003')
              else:
                  return []
  
      def _check_fields(self, obj):
keep keep keep keep replace 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