title: How to have two models reference each other Django
body: <p>I have the following code:</p>
  <pre><code>class Game(models.Model):
      title = models.CharField(max_length=50)
      summery = models.CharField(max_length=500)
      key = models.IntegerField()
      pin = models.CharField(max_length=12)
      complete = models.BooleanField()
      invite_sent = models.DateTimeField()
      on = models.ForeignKey(Member, blank = True) #&lt;----
  
  
  class Member(models.Model):
      email = models.CharField(max_length=100)
      color = models.CharField(max_length=11)
      game = models.ForeignKey(Game) #&lt;----
  </code></pre>
  <p>The &quot;on&quot; foreign key links to one of the members (whose turn it is). All members of a game have their &quot;game&quot; foreign key set to the game they are on. The problem is that Django won't let me reference a class before it has been declared, and since I can't declare them simultaneously...</p>
  <p>Edit: To clear things up, here's an example. If there were five members playing one game, all five would have foreign keys to the game. The game on the other hand would have one foreign key to the particular member whose turn it was.</p>