X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/1df20e49415f48203b097a6efe616bb289988227..5715ba5816c2773949689461f715a08caa8c5d11:/src/archive/admin.py diff --git a/src/archive/admin.py b/src/archive/admin.py index 397f973..10f1a33 100644 --- a/src/archive/admin.py +++ b/src/archive/admin.py @@ -1,6 +1,16 @@ -from archive.models import Project, Audiobook, Piece +from archive.models import Project, Audiobook, License from django.contrib import admin admin.site.register(Project) -admin.site.register(Audiobook) -admin.site.register(Piece) + + +class AudiobookAdmin(admin.ModelAdmin): + list_display = ["title", "slug", "index", "part_name", "duration", "license", "youtube_volume"] + list_filter = ["license"] + search_fields = ["title", "slug", "part_name", "youtube_volume"] + list_editable = ["youtube_volume"] + readonly_fields = ['duration'] + + +admin.site.register(Audiobook, AudiobookAdmin) +admin.site.register(License)