Django “xxxxxx Object” display customization in admin action sidebar

__unicode__ does do that. Your model should look something like this:

class SomeModel(models.Model):
    def __unicode__(self):
       return 'Policy: ' + self.name

On Python 3 you need to use __str__:

def __str__(self):
   return 'Policy: ' + self.name

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)