title: override __str__(self) of a model from an imported app
body: <p>I'm facing the following situation: I have a django project, which uses an outside app [App1]. Within App1, it has the following structure:</p>
  
  <ol>
  <li><p>abstract class 'Base':</p>
  
  <pre><code>class Base(models.Model):
      """
      Base model with boilerplate for all models.
      """
  
      name = models.CharField(max_length=200, db_index=True)
      alternate_names = models.TextField(null=True, blank=True, 
      default='')
      ..............
      ..............
      class Meta:
          abstract = True
  
     def __str__(self):
          display_name = getattr(self, 'display_name', None)
          if display_name:
              return display_name
  
     return self.name
  </code></pre></li>
  <li><p>abstract class based on 'Base', called 'AbstractClassA':</p>
  
  <pre><code>class AbstractClassA(Base):
  
      display_name = models.CharField(max_length=200)
      ....
      ....
  
      class Meta(Base.Meta):
          abstract = True
  
      def get_display_name(self):
          ....
          ....
          return ....
  </code></pre></li>
  <li><p>The non abstract class class ClassA(AbstractClassA) </p></li>
  </ol>
  
  <p>Now, when I do a query in my view for this ClassA, for example:</p>
  
  <pre><code>    qs = ClassA.objects.filter(Q(name__icontains=query_term)....)
      return qs
  </code></pre>
  
  <p>I feed this qs into another outside app (autocomplete), so that when I type in 'xxxx' on my web form, the form would give me suggestions on available matches in the DB, based on this qs.</p>
  
  <p>This all works great, the only thing is, the list of potential matches shown to me is the default representation of the ClassA objects, which I traced back to </p>
  
  <pre><code>   def __str__(self):
          display_name = getattr(self, 'display_name', None)
          if display_name:
              return display_name
          return self.name
  </code></pre>
  
  <p>defined in the base abstract model I've mentioned earlier. What I want is, to have something else displayed as the list of potential matches (e.g. instead of 'display_name' or 'name', show me 'fieldA' + ';'+ 'fieldB' of each filtered item in qs). </p>
  
  <p>My thought was to override this <code>__str__</code> method somewhere. But because both the upstream and downstream aspect of my process are done in outside apps that I don't want to modify directly (i.e. copy directly into my Django project and rewrite certain parts), I'm not sure how I could achieve my goal.</p>
  
  <p>Is there any elegant way to do so?</p>
  
  <p>Please let me know if anything is unclear, or if I could provide you with any further information. Thanks!</p>