MCPcopy
hub / github.com/django/django / user_deleted_form

Method user_deleted_form

django/contrib/admin/options.py:2647–2652  ·  view source on GitHub ↗

Return whether or not the user deleted the form.

(request, obj, formset, index, inline)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

has_delete_permissionMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected