JavaScript customizations in the admin
JavaScript customizations in the admin
Inline form events
New in Django 1.9.
You may want to execute some JavaScript when an inline form is added or removed in the admin change form. The formset:added
and formset:removed
jQuery events allow this. The event handler is passed three arguments:
-
event
is thejQuery
event. -
$row
is the newly added (or removed) row. -
formsetName
is the formset the row belongs to.
The event is fired using the django.jQuery namespace.
In your custom change_form