Feb-03-2020, 06:12 PM
class Board(models.Model): category = models.CharField(max_length=20, unique=True) description = models.CharField(max_length=100) def __str__(self): return self.categoryUsing this as example, if you want to return a
self.catagory
you'll need to define it with self.
above.Then if you want access to it I think this is the way, but instead of using
Board
use the instance name. what_you_want = Board._str_()