I have a model in Django 3:
class Ingredient(models.Model):
name_EN = models.CharField(max_length=100, unique=True, null=True)
hexcolor = models.CharField(max_length=7, default="#ffffff")
def __str__(self):
return self.name_EN
This lists Ingredients and has associated a name with it, e.g. 'Dill' or 'Tomato', and a 'hexcolor' e.g. #C5E1A5 or #DD2C00. Currently, from the admin site, I can see the ingredients listed as name_EN of the Ingredient, and when I click through also the hexcolor value (#......). But I would like to see the actual color listed next to the name_EN, so I can see it (and change when needed). It doesn't necessarily need a color picker, could be nice, but I seek in the first place how to display the color (e.g. the background color of the hexcolor field?).
Any suggestions where and how to do this? Would be appreciated.