Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functionality to call javascript hooks before/after adding a new inline form in a formset #4

Open
mnzaki opened this issue Jun 2, 2015 · 1 comment

Comments

@mnzaki
Copy link

mnzaki commented Jun 2, 2015

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 darklow/django-suit#337 (comment))

I think a similar system in super-inlines would make super-inlines more super.

django-suit implementation:

  1. Functionality to register new hooks: https://github.com/darklow/django-suit/blob/develop/suit/static/suit/js/suit.js#L4
  2. Hooks are called after adding a new row: https://github.com/darklow/django-suit/blob/develop/suit/templates/admin/edit_inline/stacked.html#L78
@BertrandBordage
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants