Django bug - Dual display of the CheckboxSelectMultiple widget label
forms.py
class LegacyForm(forms.ModelForm):
class Meta:
model = Legacy
fields = [
'app_should_include',
]
app_should_include = forms.MultipleChoiceField(
choices=APP_SHOULD_INCLUDE_LEGACY.items(),
widget=forms.CheckboxSelectMultiple,
label='App should include :',
)
models.py
class Legacy(models.Model):
app_should_include = ArrayField(
models.CharField(
choices=APP_SHOULD_INCLUDE.items(),
max_length=24,
blank=True,
),
)
When I replace the label value with “okokokokokokokok:”, both labels are changed to “okokokokokokokok:”.
forms.py
app_should_include = forms.MultipleChoiceField(
choices=APP_SHOULD_INCLUDE_LEGACY.items(),
widget=forms.CheckboxSelectMultiple,
label='okokokokokokokok :',
)
But the problem is that I only want one label.
Can anyone help me fix this problem?