Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ничего не делает:
- class CreatePerson(forms.ModelForm):
- def __init__(self, *args, **kwargs):
- super(CreatePerson, self).__init__(*args, **kwargs)
- self.fields['email'].label_classes = ('label_cls',)
- self.fields['email'].validators=[EmailValidator(message="Некорректный адрес электронной почты")]
- #если так, то "'CreatePerson' object has no attribute 'fields'":
- class CreatePerson(forms.ModelForm):
- def __init__(self, *args, **kwargs):
- self.fields['email'].label_classes = ('label_cls',)
- super(CreatePerson, self).__init__(*args, **kwargs)
- self.fields['email'].validators=[EmailValidator(message="Некорректный адрес электронной почты")]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement