title: Reference multiple foreign keys in Django Model
body: <p>I'm making a program that helps log missions in a game. In each of these missions I would like to be able to select a number of astronauts that will go along with it out of the astronauts table. This is fine when I only need one, but how could I approach multiple foreign keys in a field?</p>
  
  <p>I currently use a 'binary' string that specifies which astronauts are to be associated with the mission (1 refers to Jeb, but not Bill, Bob, or Val and 0001 means only Val), with the first digit specifying the astronaut with id 1 and so forth. This works, but it feels quite clunky.</p>
  
  <p>Here's the model.py for the two tables in question.</p>
  
  <pre><code>class astronauts(models.Model):
      name = models.CharField(max_length=200)
      adddate = models.IntegerField(default=0)
      experience = models.IntegerField(default=0)
      career = models.CharField(max_length=9, blank=True, null=True)
      alive = models.BooleanField(default=True)
  
      def __str__(self):
          return self.name
  
      class Meta:
          verbose_name_plural = "Kerbals"
  
  class missions(models.Model):
  
      # mission details
      programid = models.ForeignKey(programs, on_delete=models.SET("Unknown"))
      missionid = models.IntegerField(default=0)
      status = models.ForeignKey(
          missionstatuses, on_delete=models.SET("Unknown"))
      plan = models.CharField(max_length=1000)
  
      # launch
      launchdate = models.IntegerField(default=0)
      crewmembers = models.IntegerField(default=0)
  
      # recovery
      summary = models.CharField(max_length=1000, blank=True)
      recdate = models.IntegerField(default=0)
  
      def __str__(self):
          return str(self.programid) + '-' + str(self.missionid)
  
      class Meta:
          verbose_name_plural = "Missions"
  </code></pre>
  
  <p>I saw a post about an 'intermediate linking table' to store the crew list but that also isn't ideal.</p>
  
  <p>Thanks!</p>