title: How do I get the reverse of the inline formset in Django?
body: <p>See this example below in <a href="https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#inline-formsets" rel="nofollow">the documentation of Django</a>:</p>
  
  <blockquote>
  <pre><code>from django.db import models
  
  class Author(models.Model):
      name = models.CharField(max_length=100)
  
  class Book(models.Model):
      author = models.ForeignKey(Author)
      title = models.CharField(max_length=100)
  </code></pre>
    
    <p>If you want to create a formset that allows you to edit books
    belonging to a particular author, you could do this:</p>
  
  <pre><code>&gt;&gt;&gt; from django.forms.models import inlineformset_factory
  &gt;&gt;&gt; BookFormSet = inlineformset_factory(Author, Book)
  &gt;&gt;&gt; author = Author.objects.get(name=u'Mike Royko')
  &gt;&gt;&gt; formset = BookFormSet(instance=author)
  </code></pre>
  </blockquote>
  
  <p>This is a one-to-many relationship with Authors to Books and provides an easy way to edit the books for a single author.</p>
  
  <p>Now I want to do the opposite: a form to edit/create authors with an inline formset of books to edit/create. How do I do that? I would really prefer a way to do this with ModelForms and <em>without</em> the need to create an instance of one of the Models involved.</p>
  
  <p>For example:</p>
  
  <h3>Add Author Form</h3>
  
  <ul>
  <li>Author name: <code>[________]</code></li>
  <li>Books:
  <ul>
  <li>Title: <code>[________]</code></li>
  <li>Title: <code>[________]</code></li>
  <li>Title: <code>[________]</code></li>
  <li>(add more)</li>
  </ul></li>
  <li><code>[save]</code></li>
  </ul>
  
  <p>Note: I need this without any instances of Authors at this point.</p>
  
  <p>I'm probably missing out on something simple here and I've spent a bit too much time on the documentation here. A bit of help is welcome!</p>