我有表格:
@parsleyfy
class Form_registration (ModelForm):
class Meta:
parsley_extras = {
'password': {
'minlength': "5",
},
'password2': {
'equalto': "password",
'error-message': "Your passwords not equales",
},
}
model = Users_data
parsley_namespace = 'custom'
bir_date = DateField(widget=SelectDateWidget(years=range(1910, 2020)), label="")
widgets = {
'first_name_user': forms.TextInput(attrs={'placeholder': 'First
'e_mail': forms.TextInput(attrs={'placeholder': 'Your Email'}),
'e_mail2': forms.TextInput(attrs={'placeholder': 'Re-Entere Email'}),
'password': widgets.PasswordInput(attrs={'placeholder': 'New Password'}),
'password2': widgets.PasswordInput(attrs={'placeholder': 'Re-Entere Password'}),
'bir_date': forms.DateField(),
}
但是在页面小部件不起作用的情况下,我只看到没有占位符的空字段。 为什么呢?