django-super-inlines
django-super-inlines copied to clipboard
Add functionality to call javascript hooks before/after adding a new inline form in a formset
It's a common issue that one needs to run some code after a new row is added in an inline formset (usually to setup widgets). django-suit has a system in-place to handle this (see https://github.com/darklow/django-suit/issues/337#issuecomment-72213815)
I think a similar system in super-inlines would make super-inlines more super.
django-suit implementation:
- Functionality to register new hooks: https://github.com/darklow/django-suit/blob/develop/suit/static/suit/js/suit.js#L4
- Hooks are called after adding a new row: https://github.com/darklow/django-suit/blob/develop/suit/templates/admin/edit_inline/stacked.html#L78
Hi @mnzaki,
Yes, I’ll add that in a near future. As you can see at this line, that’s what I already did for the django-grappelli integration.