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
Source:stackexchange.com