2

I am new to Django and Python programming and I have looking in circles to solve this problem I have. I wrote following codes...whenever the below codes were executed, the inline filter is always default as 'close'. How can I default to 'open' or 'show' instead of default 'close'? Thank you.

class ArInvoiceSimpleInlineForeign(admin.TabularInline):
    model = ArInvoice
    extra = 2
    classes = ('collapse open',)
    inline_classes = ('collapse open',) 
dan1st
  • 12,568
  • 8
  • 34
  • 67
joecool
  • 21
  • 1
  • I checked HTML of the admin page and it seems that 'closed' state is default because the element has the 'collapsed' css class. In order to open the section, you need not to add any class but to remove the 'collapsed' class. I couldn't find a way to do that with officially provided tools. So it requires custom code – Ivan Beliakov Dec 03 '22 at 14:59

0 Answers0