1 from admin_ordering.admin import OrderableAdmin
2 from django.contrib import admin
6 @admin.register(models.Package)
7 class PackageAdmin(admin.ModelAdmin):
8 raw_id_fields = ['books']
11 class MediaInsertTextInline(OrderableAdmin, admin.TabularInline):
12 model = models.MediaInsertText
16 class PriceLevelInline(OrderableAdmin, admin.TabularInline):
17 model = models.PriceLevel
21 @admin.register(models.Shop)
22 class ShopAdmin(admin.ModelAdmin):
24 MediaInsertTextInline,
28 @admin.register(models.ShopBookPublish)
29 class ShopBookPublishAdmin(admin.ModelAdmin):
30 list_display = ['created_at', 'book', 'user', 'shop', 'status', 'started_at', 'finished_at']
31 list_filter = ['status', 'shop']
32 search_fields = ['book', 'user']
33 date_hierarchy = 'started_at'