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()
)
Source:stackexchange.com