I have a logical field,
is_operable = BooleanField(widget=RadioSelect(choices=YES_OR_NO, renderer=InlineRadioFieldRenderer), required=False, initial=True)
Which is displayed as two radio buttons (yes or no), but I want this to be necessary. The problem is that if I change it to required=True, it throws a validation error when it receives False.
Is there any way around this?
YES_OR_NO = (
(True, 'Yes'),
(False, 'No')
)
source
share