publish log in admin
authorRadek Czajka <rczajka@rczajka.pl>
Thu, 24 Aug 2023 10:40:54 +0000 (12:40 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 24 Aug 2023 10:40:54 +0000 (12:40 +0200)
src/depot/admin.py

index 3ad1fa3..ce9cc3b 100644 (file)
@@ -24,3 +24,10 @@ class ShopAdmin(admin.ModelAdmin):
         MediaInsertTextInline,
         PriceLevelInline,
     ]
+
+@admin.register(models.ShopBookPublish)
+class ShopBookPublishAdmin(admin.ModelAdmin):
+    list_display = ['created_at', 'book', 'user', 'shop', 'status', 'started_at', 'finished_at']
+    list_filter = ['status', 'shop']
+    search_fields = ['book', 'user']
+    date_hierarchy = 'started_at'