          # Caution: this is only safe if you are certain that headline will be
          # in ASCII.
          return self.headline
  
  @python_2_unicode_compatible
  class BrokenArticle(models.Model):
      headline = models.CharField(max_length=100)
      pub_date = models.DateTimeField()
  
      def __unicode__(self):      # instead of __str__
          return self.headline
  
  @python_2_unicode_compatible
  class InternationalArticle(models.Model):
      headline = models.CharField(max_length=100)
      pub_date = models.DateTimeField()
  
 
</s> remove             if type(self).__unicode__ == Model.__str__:
                klass_name = type(self).__name__
                raise RuntimeError("%s.__unicode__ is aliased to __str__. Did"
                                   " you apply @python_2_unicode_compatible"
                                   " without defining __str__?" % klass_name)
 </s> add  </s> remove from .models import Article, BrokenArticle, InternationalArticle
 </s> add from .models import Article, InternationalArticle </s> remove @python_2_unicode_compatible
 </s> add  </s> remove from django.utils.encoding import force_bytes, force_text, filepath_to_uri
 </s> add from django.utils.encoding import (force_bytes, force_text, filepath_to_uri,
        python_2_unicode_compatible)
          # Caution: this is only safe if you are certain that headline will be
          # in ASCII.
          return self.headline
  








  @python_2_unicode_compatible
  class InternationalArticle(models.Model):
      headline = models.CharField(max_length=100)
      pub_date = models.DateTimeField()
  
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
 Fixed #21198 -- Prevented invalid use of @python_2_unicode_compatible.

Thanks jpic for the report and chmodas for working on a patch.

Reverts 2ea80b94. Refs #19362. 
tests/str/models.py