Tweaked philo migrations to force contenttype creation after migration 0005 so the...
[philo.git] / admin / collections.py
1 from django.contrib import admin
2 from philo.admin.base import COLLAPSE_CLASSES
3 from philo.models import CollectionMember, Collection
4
5
6 class CollectionMemberInline(admin.TabularInline):
7         fk_name = 'collection'
8         model = CollectionMember
9         extra = 1
10         classes = COLLAPSE_CLASSES
11         allow_add = True
12         fields = ('member_content_type', 'member_object_id', 'index')
13
14
15 class CollectionAdmin(admin.ModelAdmin):
16         inlines = [CollectionMemberInline]
17         list_display = ('name', 'description', 'get_count')
18
19
20 admin.site.register(Collection, CollectionAdmin)