X-Git-Url: https://git.mdrn.pl/audio.git/blobdiff_plain/eee35e00bf0d0eb3d2a9f08f72c7052962fecbf6..10ee4271e2cb35c585726a1c306e6c4ef561b257:/src/archive/admin.py?ds=inline diff --git a/src/archive/admin.py b/src/archive/admin.py index d0804be..94c3aaf 100644 --- a/src/archive/admin.py +++ b/src/archive/admin.py @@ -1,5 +1,17 @@ -from archive.models import Project, Audiobook +from archive.models import Project, Audiobook, License, Config from django.contrib import admin admin.site.register(Project) -admin.site.register(Audiobook) + + +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) +admin.site.register(Config)