1👍
✅
You should check form data in the cleaned_data
dictionary instead of fields
:
if 'DELETE' in form.fields and form.cleaned_data.get('DELETE'):
Source:stackexchange.com