Added philo-root reversal caching to Node.construct_url.
[philo.git] / philo / admin / collections.py
1 from django.contrib import admin
2
3 from philo.admin.base import COLLAPSE_CLASSES
4 from philo.models import CollectionMember, Collection
5
6
7 class CollectionMemberInline(admin.TabularInline):
8         fk_name = 'collection'
9         model = CollectionMember
10         extra = 1
11         classes = COLLAPSE_CLASSES
12         allow_add = True
13         fields = ('member_content_type', 'member_object_id', 'index')
14         sortable_field_name = 'index'
15
16
17 class CollectionAdmin(admin.ModelAdmin):
18         inlines = [CollectionMemberInline]
19         list_display = ('name', 'description', 'get_count')
20
21
22 admin.site.register(Collection, CollectionAdmin)