title: How do I correctly create a related object overriding the save() method?
body: <p>I'm overriding the <code>save()</code> method on a subclass of a UserCreationForm. I'm doing so because I'd like to create another related object as the User object is created.<br>
  Here is the form along with the save method:  </p>
  
  <pre><code>class MyUserCreationForm(UserCreationForm):
  
      error_message = UserCreationForm.error_messages.update({
          'duplicate_username': 'This username has already been taken.'
      })
  
      class Meta(UserCreationForm.Meta):
          model = User
  
      def clean_username(self):
          username = self.cleaned_data["username"]
          try:
              User.objects.get(username=username)
          except User.DoesNotExist:
              return username
          raise forms.ValidationError(self.error_messages['duplicate_username'])
  
      def save(self, commit=True):
          user = super(MyUserCreationForm, self).save(commit=False)
          if commit:
              user.save()
              Profile.objects.create(user=user)
          return user  
  </code></pre>
  
  <p>So the <code>Profile</code> object is never created. I can get it to work, technically, if I remove the <code>if commit:</code> like so:    </p>
  
  <pre><code>    def save(self, commit=True):
          user = super(MyUserCreationForm, self).save(commit=False)
          user.save()
          Profile.objects.create(user=user)
          return user   
  </code></pre>
  
  <p>However I'd like to know why <code>False</code> is being passed to the <code>save()</code> method each time I create a User. Based on what I've read, the conditional should be there in order to preserve the same behavior as the overridden <code>save()</code> method.  </p>