forked from rc/aircox
fix glitches
This commit is contained in:
@ -51,15 +51,10 @@ class ScheduleAdmin(admin.ModelAdmin):
|
||||
return obj.get_frequency_verbose()
|
||||
freq.short_description = _('Day')
|
||||
|
||||
def rerun(self, obj):
|
||||
return obj.initial is not None
|
||||
rerun.short_description = _('Rerun')
|
||||
rerun.boolean = True
|
||||
|
||||
list_filter = ['frequency', 'program']
|
||||
list_display = ['program_title', 'freq', 'time', 'timezone', 'duration',
|
||||
'rerun']
|
||||
list_editable = ['time', 'duration']
|
||||
'initial']
|
||||
list_editable = ['time', 'duration', 'initial']
|
||||
|
||||
def get_readonly_fields(self, request, obj=None):
|
||||
if obj:
|
||||
|
@ -16,13 +16,15 @@ class TracksInline(SortableInlineAdminMixin, admin.TabularInline):
|
||||
list_filter = ['artist', 'title', 'tags']
|
||||
|
||||
|
||||
|
||||
class SoundInline(admin.TabularInline):
|
||||
model = Sound
|
||||
fields = ['type', 'path', 'embed', 'duration', 'is_public']
|
||||
readonly_fields = ['type', 'path', 'duration']
|
||||
extra = 0
|
||||
|
||||
def get_queryset(self, request):
|
||||
return super().get_queryset(request).available()
|
||||
|
||||
|
||||
@admin.register(Sound)
|
||||
class SoundAdmin(admin.ModelAdmin):
|
||||
|
Reference in New Issue
Block a user