title: django modelformset_factory - management form data is missing
body: <p>I am still fighting with formsets and I cant really understand why I am getting this error:</p>
  
  <p>u'ManagementForm data is missing or has been tampered with</p>
  
  <p>Thats my code:
  Please point out my mistakes and help me with resolving this issue.</p>
  
  <pre><code>@csrf_protect
  @transaction.commit_on_success
  def signup(request):
      form = NewUserCreationForm()
      doc_form = NewDocRegisterForm()
  
      SpecialityLicensesFormSet = modelformset_factory(SpecialityLicenses, extra=1, exclude = ('user'))
      formset = SpecialityLicensesFormSet(queryset=SpecialityLicenses.objects.none())
  
      if request.method == "POST":
  
          form = NewUserCreationForm(request.POST or None)
          doc_form = NewDocRegisterForm(request.POST or None)
          formset = SpecialityLicensesFormSet(request.POST or None)
  
  
          if form.is_valid() and doc_form.is_valid() and formset.is_valid():
  
              user = form.save()
  
              doc = doc_form.save(commit=False)
              doc.user = user
              doc.save()
  
  
  
              print formset
              fset = formset.save(commit=False)
  
              for n in fset:
                  n.user = user
                  n.save()
  
              return HttpResponse("Uzytkownik utowrzony")
  
      return render_to_response("userena/signup_new.html", {'form': form,
                                                            'doc_form': doc_form,
                                                            'spec_form': formset,}, 
                                context_instance=RequestContex
  
  t(request)) 
  </code></pre>
  
  <p>Template code:</p>
  
  <pre><code>&lt;form action="/en/accounts/doc_register/" method="post"&gt;{% csrf_token %}
      {% for field in form %}
  
  
      &lt;div&gt;
          {% if field.errors %}
              {{ field.errors|striptags }} |
          {% endif %}
  
          {{field.label}} | {{ field}}
      &lt;/div&gt;
  
  
      {% endfor %}
  
      &lt;hr&gt;
  
  
      {% for f in doc_form %}
      &lt;div&gt;
      {% if f.errors %}
      {{f.errors|striptags}} | 
      {% endif %}
  
      {{f.label}} : {{ f }}
      &lt;/div&gt;
      {% endfor %}
      &lt;hr&gt;
  
      {{ spec_form.management_form }}
      {{ spec_form }}
  
              &lt;hr&gt;
      &lt;input type="submit" value="Submit"/&gt;
  &lt;/form&gt;
  {% endblock %}
  </code></pre>