SoundAdmin.add_view fix

This commit is contained in:
bkfox
2023-01-25 16:21:19 +01:00
parent 4c3878a300
commit c2cd3b0301
6 changed files with 40 additions and 23 deletions

View File

@ -70,12 +70,12 @@ class SoundAdmin(SortableAdminBase, admin.ModelAdmin):
if obj.type != Sound.TYPE_REMOVED else ''
audio.short_description = _('Audio')
def add_view(self, request, object_id, form_url='', context=None):
def add_view(self, request, form_url='', context=None):
context = context or {}
context['init_app'] = True
context['init_el'] = '#inline-tracks'
context['track_timestamp'] = True
return super().change_view(request, object_id, form_url, context)
return super().add_view(request, form_url, context)
def change_view(self, request, object_id, form_url='', context=None):
context = context or {}