﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
8346	overriding widget in ModelChoiceField doesn't work as expected	derelm	nobody	"Using below custom ModelChoiceField will not use RadioSelect widget as expected.

{{{
class MyModelChoiceField(forms.ModelChoiceField):
    widget = forms.RadioSelect
}}}

You  can work around that issue by overriding __init__ like so:

{{{
class MyModelChoiceField(forms.ModelChoiceField):
    def __init__(self, *args, **kwargs):
        return super(MyModelChoiceField, self).__init__(widget=forms.RadioSelect, *args, **kwargs)
}}}

I guess this is a bug either with ModelChoiceField or with the documentation."		closed	Forms	dev		duplicate			Accepted	0	0	0	0		
