Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Maxemp , in short.
Declare a child form class, inheriting from UserCreationForm.
Override the __init__ method of the child class, you can change anything in it.
In this case, something like this:
class MyUserCreationForm(UserCreationForm):
def __init__(self, *args, **kwargs):
super(UserCreationForm, self).__init__(*args, **kwargs)
self.fields['username'].help_text = ''
self.fields['password'].help_text = ''
class MyUserCreationForm(UserCreationForm):
class Meta:
model = User
help_texts = {
'password': '',
'username': '',
}
I just made label = '' in forms.py, that is, empty and removed everything
password1 = forms.CharField(label = '',required = True, widget = forms.PasswordInput(attrs = {'placeholder': 'Введите пароль'}))
password2 = forms.CharField(label = '',required = True, widget = forms.PasswordInput(attrs = {'placeholder': 'Повторите пароль'})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question