I have a model with a property
, It returns boolean, I want to show it as icon in django model admin.
models.py
class Foo(models.Model): bar = models.TextField("Title", null=True, blank=True) @property def is_new_bar(self): return bar == 'NEW'
admin.py
class FooAdmin(admin.ModelAdmin): list_display = ('bar', 'is_new_bar') # is_new_bar is shown as True/False text, I want this as bool icon of django.