fnp
/
audio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Flatten the post data.
[audio.git]
/
src
/
archive
/
admin.py
diff --git
a/src/archive/admin.py
b/src/archive/admin.py
index
f6fcd4a
..
10f1a33
100644
(file)
--- a/
src/archive/admin.py
+++ b/
src/archive/admin.py
@@
-1,16
+1,16
@@
-from archive.models import Project, Audiobook,
Piece,
License
+from archive.models import Project, Audiobook, License
from django.contrib import admin
admin.site.register(Project)
class AudiobookAdmin(admin.ModelAdmin):
from django.contrib import admin
admin.site.register(Project)
class AudiobookAdmin(admin.ModelAdmin):
- list_display = ["title", "slug", "index", "part_name", "license", "youtube_volume"]
+ list_display = ["title", "slug", "index", "part_name", "
duration", "
license", "youtube_volume"]
list_filter = ["license"]
list_filter = ["license"]
-
list_search
= ["title", "slug", "part_name", "youtube_volume"]
+
search_fields
= ["title", "slug", "part_name", "youtube_volume"]
list_editable = ["youtube_volume"]
list_editable = ["youtube_volume"]
+ readonly_fields = ['duration']
admin.site.register(Audiobook, AudiobookAdmin)
admin.site.register(Audiobook, AudiobookAdmin)
-admin.site.register(Piece)
admin.site.register(License)
admin.site.register(License)