[Answered ]-Django ChoiceField and RadioSelect return EnumMeta error

1👍

You can not pass an IntegerChoices class as choices=… parameter. However an IntegerChoices class makes it more convenient to define choices, you can use the .choices attribute so:

question = forms.ChoiceField(
    choices=Answer.choices,
    widget=forms.RadioSelect()
)

Leave a comment