title: Django: Form object has no attribute cleaned_data - save() method
body: <p>Ok so I actually solved this one by accident and would simply like to understand what happened.</p>
  
  <p>I have my own user registration form BaseCreationForm which extends a ModelForm and uses a UserProfile as its model. All the validation methods were working fine, but the save method was giving me grief. Whenever I tried to create a user (the profile is created in the view, I may refactor this), Django would tell me that "BaseCreationForm object has no attribute cleaned data". </p>
  
  <p>BUT, when out of frustration and running out of ideas I added a simple "print self" statement before creating the user in the save() method, the problem disappeared and users are being created normally. Below are a couple of clean() methods that work, the save() method and a snippet from the view that calls the clean() and save() method.</p>
  
  <p>clean() methods working normally</p>
  
  <pre><code>#example clean methods, both work beautifully
  def clean_email(self):
      email = self.cleaned_data["email"]
      if not email:
          raise forms.ValidationError(self.error_messages['no_email'])
  
      try:
          User.objects.get(email=email)
      except User.DoesNotExist:
          return email
      raise forms.ValidationError(self.error_messages['duplicate_email'])
  
  def clean_password2(self):
      # Check that the two password entries match
      password1 = self.cleaned_data.get("password1")
      password2 = self.cleaned_data.get("password2")
      if password1 and password2 and password1 != password2:
          raise forms.ValidationError(
              self.error_messages['password_mismatch'])
      return password2
  </code></pre>
  
  <p>save() method:</p>
  
  <pre><code> #save method requiring wizardry
   def save(self, commit=True):
      #This line makes it work. When commented, the error appears
      print self
      ###  
      user = User.objects.create_user(
          username=self.cleaned_data.get("username"),
          first_name=self.cleaned_data["first_name"],
          last_name=self.cleaned_data["last_name"],
          email=self.cleaned_data["email"],
          )
      user.set_password(self.cleaned_data["password1"])
      if commit:
          user.save()
      return user
  </code></pre>
  
  <p>And the view (some stuff left out):</p>
  
  <pre><code>class RegistrationView(FormView):
      template_name = 'register.html'
      form_class = BaseCreationForm
      model = UserProfile
      success_url = '/account/login/'
  
      def form_valid(self, form):
          form                    = BaseCreationForm(self.request.POST,
                                                    self.request.FILES)
          user                    = form.save()
          profile                 = user.get_profile()
          profile.user_type       = form.cleaned_data['user_type']
          profile.title           = form.cleaned_data['title']
          profile.company_name    = form.cleaned_data['company_name']
          .
          .
          .
          profile.save()
          return super(RegistrationView, self).form_valid(form)
  </code></pre>