title: Django Models.py N to N relationship, always says one object is not defined
body: <p>I'm doing a simple test with a Django project with Academies, Teachers and Students.</p>
  
  <p>I'm trying this:</p>
  
  <pre><code>class Student(models.Model):
      name = models.CharField()
      direction = models.CharField()
      city = models.CharField()
      telephone = models.CharField(max_length=9)
      email = models.EmailField()
      teachers = models.ForeignKey(Teacher)
  
  class Teacher(models.Model):
      name = models.CharField(max_length=50)
      direction = models.CharField(max_length=150)
      city = models.CharField(max_length=50)
      telephone = models.CharField(max_length=9)
      email = models.EmailField()
      students = models.ForeignKey(Student)
  
  class Academy(models.Model):
      name = models.CharField(max_length=50)
      direction = models.CharField(max_length=150)
      city = models.CharField(max_length=50)
      teacher = models.ForeignKey(Teacher, blank=True, null=True)
      students = models.ForeignKey(Student)
  </code></pre>
  
  <p>The problem is that if I implement first Student, doesnt find theacher to make a Foreign Key, and the same if I implement first Teacher.</p>
  
  <p>There is any way to define the models before implementing them like functions in C?</p>
  
  <p>Thanks!</p>