1 from django.contrib import admin
3 from philo.admin.base import COLLAPSE_CLASSES
4 from philo.models import CollectionMember, Collection
7 class CollectionMemberInline(admin.TabularInline):
9 model = CollectionMember
11 classes = COLLAPSE_CLASSES
13 fields = ('member_content_type', 'member_object_id', 'index')
14 sortable_field_name = 'index'
17 class CollectionAdmin(admin.ModelAdmin):
18 inlines = [CollectionMemberInline]
19 list_display = ('name', 'description', 'get_count')
22 admin.site.register(Collection, CollectionAdmin)