According to the documentation:
The default label for a Field is generated from the field name by converting all underscores to spaces and upper-casing the first letter. Specify label if that default behavior doesn’t result in an adequate label.
Pass the label
argument to the DateField
constructor:
drum_period_1 = forms.DateField(
widget=forms.TextInput(attrs={
'class':'datepicker',
}),
required=False,
label = "qwerty"
)
Or, rename drum_period_1
to qwerty
:
class DrumDataForm(forms.ModelForm):
qwerty = forms.DateField(
widget=forms.TextInput(attrs={
'class':'datepicker',
}),
required=False,
)
class Meta:
model = UserProfile
fields = (
'qwerty',
)