[Fixed]-Altering the listview of the django admin portal

1👍

✅

You need edit your Course model class:

# models.py
class Course(models.Model):

    # fields here
    name = ...
    # ...

    # add a unicode method
    # __str__ method if you are using python 3.x
    def unicode(self):
        return '%s - %s' % (self.pk, self.name)

Leave a comment