- if isinstance(setting, (Setting.emulators.get(str, DummySetting), Setting.emulators.get(unicode, DummySetting))):
+ widget = setting.field_context.get('widget', None)
+
+ if widget is forms.CheckboxSelectMultiple or widget is forms.SelectMultiple or isinstance(widget, forms.SelectMultiple):
+ field = forms.MultipleChoiceField(**setting.field_context)
+ elif widget is forms.RadioSelect or isinstance(widget, forms.RadioSelect):
+ field = forms.ChoiceField(**setting.field_context)
+ elif isinstance(setting, (Setting.emulators.get(str, DummySetting), Setting.emulators.get(unicode, DummySetting))):