title: AttributeError: type object has no attribute for a django model
body: <p>Here are the models:</p>
  
  <pre><code>class Teacher(models.Model):
      login = models.CharField(max_length=10, primary_key=True)
      fname = models.CharField(max_length=30)
      mname = models.CharField(max_length=30)
      lname = models.CharField(max_length=30)
  class Course(models.Model):
      semester = models.ForeignKey(Semester, on_delete=models.CASCADE)
      title = models.CharField(max_length=40)
      teachers = models.ManyToManyField(Teacher.login, through='TeacherCourse')
      credits = models.IntegerField()
      numberEnrolled = models.IntegerField()
      nomenclature = models.CharField(max_length=128)
      lectures = models.IntegerField()
  
  class TeacherCourse(models.Model):
      teacher = models.ForeignKey(Teacher.login, on_delete=models.CASCADE)
      course = models.ForeignKey(Course, on_delete=models.CASCADE)
      allotedLectures = models.IntegerField()
  </code></pre>
  
  <p>Just added these to fresh project and tried to runserver. I'm getting the following:</p>
  
  <p>AttributeError: type object 'Teacher' has no attribute 'login'</p>
  
  <p>I'm missing something obvious?</p>