Modifying Django UserCreationForm
问题 I wanted to add more fields to the standard Django UserCreationForm so I went ahead and subclassed it inside of my app's forms.py file and ended up with this: class CustomUserCreationForm(UserCreationForm): email = forms.EmailField(label = "Email") first_name = forms.CharField(label = "First name") last_name = forms.CharField(label = "Last name") class Meta: model = User fields = ("first_name", "last_name", "username",) def save(self, commit=True): user = super(CustomUserCreationForm, self)