I have had a task to implement Radio Select field with "Other" choice field in a Django Model Form. Here is my implementation in case someone would benefit from it. The idea is to have it all stored to Django's CharField type of data and have a preselected set of fields. We have a model: # models.py class Entry (models.Model): SET_OF_CHOICES = ( ( 'choice1' , 'choice1' ), ( 'choice2' , 'choice2' ), ( 'choice3' , 'choice3' ), ( 'Other' , 'Other Please Specify' ), ) choice = models.CharField(_( "Selected your choice" ), max_length= 250 ) That makes it ready for the set of fields for for our form. We are overriding Model form default field for this type of data (CharField) by intentionally specifying field with the same name. # forms.py from django.forms import ModelForm, ChoiceField, RadioSelect from models import Entry ...
My thoughts/recipes on Django, Python, JS and other things I try...