title: Django: Write a Create/Update template for a model with a ManyToMany-Through relationship
body: <p>In my app I have users, and each user can speak several languages, each at a different level. So this is how I wrote my models:</p>
  
  <pre class="lang-py prettyprint-override"><code>class Language(models.Model):
      name = models.CharField(max_length=255
  
  class UserProfile(AbstractUser):
      languages = models.ManyToManyField(Language, through='SpeakingLevel')
  
  class SpeakingLevel(models.Model):
      user = models.ForeignKey(UserProfile)
      language = models.ForeignKey(Language)
  
      LEVEL_OK = 1
      LEVEL_BAD = 2
      LEVEL_CHOICES = (
          (1, "Ok"),
          (2, "Bad")
      )
      level = models.IntegerField(null=True,
                                  choices=LEVEL_CHOICES)
  </code></pre>
  
  <p>My doubt is how should I write the templates for the UserProfile creation/updating. I have no idea. The idea is having something like this (it's an screenshot from okcupid.com):</p>
  
  <p><img src="https://i.stack.imgur.com/VW97y.png" alt="enter image description here"></p>
  
  <p>Of course, I can do it manually with a lot of javascript, and maybe a javascript template engine to add new languages to the list, but it sounds crazy for just handling a relationship, I'm sure I'm missing some cool Django feature to handle this.</p>
  
  <p>What's the right way to do this?</p>