title: Django CreateView Multiple Object Insert
body: <p>I no have an idea what title should be,
  but here I have a case that if a form was submitted it will find data from other model and insert every matched.</p>
  
  <p>currently here my code.</p>
  
  <p>here my <code>models.py</code></p>
  
  <pre><code>class Foo(models.Model):
      name = models.CharField()
      value = models.DecimalField()
  
  class Bar(models.Model):
      name = models.CharField()
      date = models.DateField()
      foo = models.ForeignKey(Foo, related_name='foo')
  </code></pre>
  
  <p>here my <code>views.py</code></p>
  
  <pre><code>class Foo(CreateView):
      fields = ('name', 'value')
      model = models.Foo
  
      def form_valid(self, form):
          self.object = form.save(commit=False)
          for i in range(30):
              self.object.bar.foo.append(self.object.id)
  
  
          return super(ModelFormMixin, self).form_valid(form)
  </code></pre>
  
  <p><code>Bar</code> have <code>ForeignKey</code> to <code>Foo</code> example if form was submitted with <code>range(30)</code> it will find <code>Bar</code> and insert (<code>append</code>) Foo <code>id</code> for every data. now i do with this,</p>
  
  <p><code>self.object.bar.foo.append(self.object.id)</code> but error said <code>'Foo' object has no attribute 'bar'</code></p>
  
  <p>how to insert <code>append</code> multiple data to <code>Bar</code> from <code>Foo(CreateView)</code> ?...</p>