title: Django save only first form of formset
body: <p>I've looked through every similar question (and tried them), but still couldn't find answer.</p>
  
  <p>I have two models:</p>
  
  <pre><code>class Project(models.Model):
      author = models.ForeignKey(settings.AUTH_USER_MODEL, default=1)
      name = models.CharField(max_length=120, verbose_name = "Название проекта")
      url = models.URLField(max_length=120, unique=True, verbose_name = "Полный адрес сайта")
      robots_length = models.CharField(max_length=5, default=0)
      updated = models.DateTimeField(auto_now=True, auto_now_add=False)
      timestamp = models.DateTimeField(auto_now=False, auto_now_add=True)
  
      def __unicode__(self):
          return self.name
  
      def __str__(self):
          return self.name
  
      def get_absolute_url(self):
          from django.urls import reverse
          return reverse('projects:detail', args=[str(self.id)])
  
  class ProjectPage(models.Model):
      page_project = models.ForeignKey(Project, on_delete=models.CASCADE)
      page_url = models.URLField(verbose_name = "Адрес страницы")
      page_title = models.CharField(max_length=300, blank=True, verbose_name = "meta-title",default="")
      page_description = models.CharField(max_length=300, blank=True, verbose_name = "meta-description",default="")
      page_h1 = models.CharField(max_length=300, blank=True, verbose_name = "Заголовок h1",default="")
  
      def __unicode__(self):
          return self.page_url
  
      def __str__(self):
          return self.page_url
  </code></pre>
  
  <p>For each model there is a form:</p>
  
  <pre><code>class ProjectFormUpdate(forms.ModelForm):
      class Meta:
          model = Project
          fields = [
              "name",
              "url",
          ]
          widgets = {
             'name': forms.TextInput(attrs={'placeholder': 'Произвольное название'}),
         }
  
  class ProjectPageForm(forms.ModelForm):
      class Meta:
          model = ProjectPage
          fields = [
              'page_project',
              'page_url',
              'page_title',
              'page_description',
              'page_h1',
          ]
          widgets = {
              'page_project': forms.HiddenInput()
          }
  </code></pre>
  
  <p>In views.py I have:</p>
  
  <pre><code>def projects_update(request, proj=None):
      instance = get_object_or_404(Project, id=proj)
      form = ProjectFormUpdate(request.POST or None, instance=instance)
  
      formset_f = modelformset_factory(ProjectPage, form=ProjectPageForm, extra=3)
      formset = formset_f(queryset=ProjectPage.objects.filter(page_project__id=proj), initial =[{'page_project': proj}])
  
      if request.method == 'POST':
          formset = formset_f(request.POST)
          for formset_form in formset:
              if formset_form.is_valid() and formset_form.has_changed():
                  formset_form.save()
          if form.is_valid():
              form.save()
  
      context = {
          'title': "Редактируем проект - "+instance.name,
          'form': form,
          'formset': formset,
          'instance': instance,
          }
      return render(request, "projects_update.html", context)
  </code></pre>
  
  <p>And, finaly, html</p>
  
  <pre><code>&lt;form method="POST" action="" class="create-form"&gt;
  {{ formset.management_form }}
  {% csrf_token %}
  &lt;div class="row"&gt;
      &lt;div class="col-lg-6 offset-lg-3 col-md-10 offset-md-1 col-xs-10 offset-xs-1 form-bg"&gt;
  
          &lt;h2&gt;Общие данные&lt;/h2&gt;
  
          {{ form|crispy}} 
      &lt;input type="submit" class="btn btn-success" value="Обновить проект" /&gt;
  
  
      &lt;/div&gt;
  &lt;/div&gt;
  
  {% for formset_form in formset %}
  &lt;div class="row form-container"&gt;
      &lt;div class="col-lg-6 offset-lg-3 col-md-10 offset-md-1 col-xs-10 offset-xs-1 form-bg"&gt;
          &lt;h3&gt;Страница {{forloop.counter}}&lt;/h3&gt;
  
  
          {{ formset_form|crispy}} 
  
  
      &lt;/div&gt;
  &lt;/div&gt;
  {% endfor %}
  
  &lt;/form&gt;
  </code></pre>
  
  <p>What I am trying to achieve is: when user enters a page, he gets a form with project name and project URL already filled in. So, he can correct them.</p>
  
  <p>Below, I want to show a filled in form for every page allready created for this project and several empty forms for creating new.</p>
  
  <p>What happens is all initial data is displayed correctly, but when I fill several empty forms - only first empty form is saved each time.</p>