forked from rc/aircox
cfr #121 Co-authored-by: Christophe Siraut <d@tobald.eu.org> Co-authored-by: bkfox <thomas bkfox net> Co-authored-by: Thomas Kairos <thomas@bkfox.net> Reviewed-on: rc/aircox#131 Co-authored-by: Chris Tactic <ctactic@noreply.git.radiocampus.be> Co-committed-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
This commit is contained in:
@ -6,7 +6,10 @@ from .page import PageAdmin
|
||||
from .schedule import ScheduleInline
|
||||
|
||||
|
||||
__all__ = ("ProgramAdmin", "StreamInline", "StreamAdmin")
|
||||
__all__ = (
|
||||
"ProgramAdmin",
|
||||
"StreamInline",
|
||||
)
|
||||
|
||||
|
||||
class StreamInline(admin.TabularInline):
|
||||
@ -27,6 +30,7 @@ class ProgramAdmin(PageAdmin):
|
||||
list_filter = PageAdmin.list_filter + ("station", "active")
|
||||
prepopulated_fields = {"slug": ("title",)}
|
||||
search_fields = ("title",)
|
||||
ordering = ("title",)
|
||||
|
||||
inlines = [ScheduleInline, StreamInline]
|
||||
|
||||
@ -42,8 +46,3 @@ class ProgramAdmin(PageAdmin):
|
||||
)
|
||||
]
|
||||
return fields
|
||||
|
||||
|
||||
@admin.register(Stream)
|
||||
class StreamAdmin(admin.ModelAdmin):
|
||||
list_display = ("id", "program", "delay", "begin", "end")
|
||||
|
Reference in New Issue
Block a user