views:

173

answers:

2

Hi,

With "fieldsets" you can make it collapsible by specifying the CSS class "collapse". How to do the same with "inlines"? Thank you!

+1  A: 

Hi, currently django does not support collapsible inlines out-of-the-box. This ticket might give you some pointers.

Nevertheless you can easly achive this by adding some javascript to your template. There are numerous plugins out there that can help you achieve this. The way to add a js to a template is overriding a ModelAdmin form with a ModelForm and setting it's Media class with the appropiate js script.

Hope this helps.

rasca
Thanks for the link, Rasca, I'll check it out.
Edwin
A: 

Check out this snippet, and you just need to include jQuery (already with Django).

Mandx