Return whether or not the user deleted the form.
(request, obj, formset, index, inline)
| 2645 | formset = FormSet(**formset_params) |
| 2646 | |
| 2647 | def user_deleted_form(request, obj, formset, index, inline): |
| 2648 | """Return whether or not the user deleted the form.""" |
| 2649 | return ( |
| 2650 | inline.has_delete_permission(request, obj) |
| 2651 | and "{}-{}-DELETE".format(formset.prefix, index) in request.POST |
| 2652 | ) |
| 2653 | |
| 2654 | # Bypass validation of each view-only inline form (since the form's |
| 2655 | # data won't be in request.POST), unless the form was deleted. |
nothing calls this directly
no test coverage detected