title: Django:Unable to save form data to database
body: <p>I have a multi-step form/wizard which I am using to register users. However, I am unable to save the data. I have given various print commands throughout the code to debug what is happening during the runtime. The print statements shows that everything seems to be working. However, I am gettig empty objects created in Database with Null values. Below is the code snippet:</p>
  
  <p>views.py</p>
  
  <pre><code>from django.shortcuts import render, render_to_response
  from .models import User, Password, PersonalDetails, CCDetails, RoundUpDetails, construct_instance
  #from .models import User
  from .forms import PostForm
  from formtools.wizard.views import SessionWizardView
  from django.core.mail import send_mail
  
  class ContactWizard(SessionWizardView):
      template_name = 'Done.html'
  
      def done(self, form_list, form_dict, **kwargs):
  
          form_data = process_form_data(form_list)
  
          return render('home.html', {form_data: 'form_data'})
  
  def process_form_data(form_list):
      form_data = [form.cleaned_data for form in form_list]
      data = [User, Password, PersonalDetails, CCDetails, RoundUpDetails]
      for i, x in enumerate(form_data):
          print("value of x: ", x)
          inst = data[i]
          newObject = inst()
          print ("BnewObject", newObject)
  
          for k, v in x.items():
              print("value of key: ", k)
              print("value of value: ", v)
              newObject.k = v
              print("newObject.k:", newObject.k)
  
          newObject.save()
  
          print("AnewObject", newObject)
  </code></pre>
  
  <p>The output:</p>
  
  <pre><code>value of x:  {'email': 'as@gmail.com'}
  BnewObject User object ()
  value of key:  email
  value of value:  as@gmail.com
  newObject.k: as@gmail.com
  AnewObject User object ()
  value of x:  {'user': 'po', 'password': 'po', 'confirmPassword': 'po'}
  BnewObject Password object (None)
  value of key:  user
  value of value:  po
  newObject.k: po
  value of key:  password
  value of value:  po
  newObject.k: po
  value of key:  confirmPassword
  value of value:  po
  newObject.k: po
  AnewObject Password object (12)
  value of x:  {'firstName': 'hjh', 'lastName': 'jhjhjh', 'phone': 'ghgjg', 'address': 'ggjj'}
  BnewObject PersonalDetails object (None)
  value of key:  firstName
  value of value:  hjh
  newObject.k: hjh
  value of key:  lastName
  value of value:  jhjhjh
  newObject.k: jhjhjh
  value of key:  phone
  value of value:  ghgjg
  newObject.k: ghgjg
  value of key:  address
  value of value:  ggjj
  newObject.k: ggjj
  AnewObject PersonalDetails object (12)
  value of x:  {'ccNum': '4386280056785678', 'month': datetime.date(2018, 8, 31), 'cvvNum': '123'}
  BnewObject CCDetails object (None)
  value of key:  ccNum
  value of value:  4386280056785678
  newObject.k: 4386280056785678
  value of key:  month
  value of value:  2018-08-31
  newObject.k: 2018-08-31
  value of key:  cvvNum
  value of value:  123
  newObject.k: 123
  AnewObject CCDetails object (12)
  value of x:  {'cause': 'education', 'charity': 'a', 'zipCode': 'hghg'}
  BnewObject RoundUpDetails object (None)
  value of key:  cause
  value of value:  education
  newObject.k: education
  value of key:  charity
  value of value:  a
  newObject.k: a
  value of key:  zipCode
  value of value:  hghg
  newObject.k: hghg
  AnewObject RoundUpDetails object (12)
  </code></pre>
  
  <p>As you can see the output shows that the objects have been created and correct values have been assigned. However, I don't see them saved in the database. Please help!</p>
  
  <p>PS: I am using MySql database. </p>