(_(i.choice), i.choice)
is in the wrong order, you won't see a translation. It's the second item that gets displayed, so you want to have: (i.choice, _(i.choice))
.
Also, if you want a dynamic form, you should be creating a dynamic form using a form factory.
Do not play with the form internals after you've created it.
Somewhere in your code:
def make_question_form_class(question):
choices = [(_(i.choice), i.choice) for i in question.choices.all()]
class _QuestionForm(forms.Form):
selection = forms.ChoiceField(choices = choices, widget=forms.RadioSelect())
return _QuestionForm
In your view:
form_class = make_question_form_class(question)
form = form_class(request.POST)
See this post by James Bennett himself for more possibilities!