1 from django.contrib import admin
2 from philo.admin.base import COLLAPSE_CLASSES
3 from philo.models import CollectionMember, Collection
6 class CollectionMemberInline(admin.TabularInline):
8 model = CollectionMember
10 classes = COLLAPSE_CLASSES
12 fields = ('member_content_type', 'member_object_id', 'index')
13 sortable_field_name = 'index'
16 class CollectionAdmin(admin.ModelAdmin):
17 inlines = [CollectionMemberInline]
18 list_display = ('name', 'description', 'get_count')
21 admin.site.register(Collection, CollectionAdmin)