1👍
✅
Try this
class PageAdmin(admin.ModelAdmin):
form = PageModelForm
inlines = [FileInLine]
def get_formsets_with_inlines(self, request, obj=None):
for inline in self.get_inline_instances(request, obj):
if isinstance(inline, FileInLine) and obj is None:
continue
yield inline.get_formset(request, obj), inline
Source:stackexchange.com