Q:

Unexpected password fields

I am trying to create the first page after a login process.  I create a form to allow users to provide more detailed information.
class AdditionalUserInfoForm(UserCreationForm):
    """
    Form for onboarding a new user account.

    """
    this_year = datetime.date.today().year
    Years = range(this_year-70, this_year+1)

    required_css_class = 'required'
    first_name = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'First Name'}), label="")
    middle_name = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Middle Name'}), label="")
    last_name = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Last Name'}), label="")
    date_of_birth = forms.DateField(widget=forms.extras.widgets.SelectDateWidget(years=Years))
    Primary_address = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Primary address'}), label="")
    Primary_address_zipcode = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Zip Code'}), label="")

    class Meta:
        model = User
        fields = ('first_name', 'middle_name', 'last_name', 'date_of_birth', 'Primary_address', 'Primary_address_zipcode')

You can see that I don't have any inputs for password.  However when I render the form I get this.  Does this page requires an authenticated user?  If so, how do I keep the user authenticate, especially since they just logged in. 

Below is my html file.
<form action="/summary/" method="post">
    {% csrf_token %}
    {{ form.as_p }}
    <input type="submit" value="Submit" />
</form>

and this is the html output. Email is a required field for the User but not the form.
<p class="required"> <input id="id_Primary_address" name="Primary_address" placeholder="Primary address" type="text" /></p>
<p class="required"> <input id="id_Primary_address_zipcode" name="Primary_address_zipcode" placeholder="Zip Code" type="text" /></p>
<p class="required"><label class="required" for="id_password1">Password:</label> <input id="id_password1" name="password1" type="password" /></p>
<p class="required"><label class="required" for="id_password2">Password confirmation:</label> <input id="id_password2" name="password2" type="password" /> <span class="helptext">Enter the same password as above, for verification.</span></p>
<input type="submit" value="Submit" />

A:

You have subclassed the UserCreationForm, which includes two password fields. If you have already created the user, you should subclass forms.ModelForm instead.

