code: def _date_field(self):
          
          for field in self.model._meta.fields:
              if isinstance(field, (DateTimeField, DateField)):
                  return field.name
docs: Try to automatically detect an image field