I want my user registration page to display email and password field, and no username. I have created this Register Form:
class RegisterForm(UserCreationForm):
email = forms.EmailField(label = "Email")
#fullname = forms.CharField(label = "First name")
class Meta:
model = User
fields = ("email", )
def save(self, commit=True):
user = super(RegisterForm, self).save(commit=False
user.email = self.cleaned_data["email"]
if commit:
user.save()
return user
But the username still appears. Do I need to override something else?