I'm am trying to test the form field
s have or don't have the required
attribute, but I don't know where to find it. This is what I have tried:
form.fields[field].widget.attrs['required']
But I get this error
:
form.fields[field].widget.attrs['required']
KeyError: 'required'
The instance of field has required
attribute:
form.fields[field].required