diff --git a/collection/games/admin.py b/collection/games/admin.py index 936e5c9..9a588a7 100644 --- a/collection/games/admin.py +++ b/collection/games/admin.py @@ -81,8 +81,18 @@ class GameAdmin(admin.ModelAdmin): class TimelineAdmin(admin.ModelAdmin): - list_display = ('date', 'status', 'item') + list_display = ('date', 'status', 'item', 'get_platform') search_fields = ('item__name', ) + list_filter = ('item__collection__shortname', ) + + def get_platform(self, obj): + """ + Display platform shortname + """ + return obj.item.collection.shortname + + get_platform.short_description = _('Platform') + get_platform.admin_order_field = ('item__collection__shortname') admin.site.register(Platform, PlatformAdmin)