diff --git a/accounts/admin.py b/accounts/admin.py index 51e6cef..06887af 100644 --- a/accounts/admin.py +++ b/accounts/admin.py @@ -1,4 +1,5 @@ from django.contrib import admin +from django.utils.safestring import mark_safe from .models import Account, Badge, BadgeGrant @@ -8,7 +9,10 @@ class AccountAdmin(admin.ModelAdmin): admin.site.register(Account, AccountAdmin) class BadgeAdmin(admin.ModelAdmin): - list_display = ('name', 'img_url') + list_display = ('name', 'icon', 'img_url') + def icon(self, obj): + return (mark_safe('' % (obj.img_url, obj.name))) + icon.short_description = 'Icon' admin.site.register(Badge, BadgeAdmin) class GrantAdmin(admin.ModelAdmin):