[Fixed]-Name field does not reflect Add profile in Admin in Django

1👍

If you are using Python 3, you should define __str__ instead of __unicode__.

class profile(models.Model):
    name = models.CharField(max_length = 1200)
    description = models.TextField(default= 'description default')

    def __str__(self):
        return self.name

Leave a comment