class CustomUserForm forms ModelForm class Meta model CustomUser field

1
2
3
4
5
6
7
8
9
class CustomUserForm(forms.ModelForm):
class Meta:
model = CustomUser
fields = ('username', 'email', 'password')
widgets = {
'username': TextInput(attrs={'class': 'form-control'}),
'email': EmailInput(attrs={'class': 'form-control'}),
'password': PasswordInput(attrs={'class': 'form-control'}),
}