title: django - no password set after successful registration
body: <p>I have created a custom User registration form, from the <code>UserCreationForm</code>. When I try to register, it does register successfully, and I can see a newly created user with the username and its email. But there's no password for that user.</p>
  
  <p>In the admin, the password field for that user is <code>No password set.</code>. Please correct me where I am wrong. Thank you.</p>
  
  <p>forms.py:</p>
  
  <pre><code>from album.forms import MyRegistrationForm
  
  from django import forms
  from django.contrib.auth.models import User
  from django.contrib.auth.forms import UserCreationForm
  
  class MyRegistrationForm(UserCreationForm):
      email = forms.EmailField(required=True)
  
      class Meta:
          model = User
          fields = ('username', 'email', 'password1', 'password2',)
  
      def save(self, commit=True):
          user = super(UserCreationForm, self).save(commit=False)
          user.email = self.cleaned_data['email']
  
          if commit:
              user.save()
  
          return user
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>def register_user(request):
      if request.method == "POST":
          form = MyRegistrationForm(request.POST)
          if form.is_valid():
              form.save()
              return HttpResponseRedirect('/accounts/register_success/')
      else:
          form = MyRegistrationForm()
      return render(request, 'register.html', {'form':form})
  </code></pre>