class MyForm(forms.Form):
CHOICES = (('1', 'one',), ('2', 'two',))
one_or_two = forms.ChoiceField(widget=forms.RadioSelect, initial='1')
def show(request):
form = MyForm()
# render form
フィールドone_or_twoを読み取り専用にする方法は?
class MyForm(forms.Form):
CHOICES = (('1', 'one',), ('2', 'two',))
one_or_two = forms.ChoiceField(widget=forms.RadioSelect, initial='1')
def show(request):
form = MyForm()
# render form
フィールドone_or_twoを読み取り専用にする方法は?