title: 'ForeignKey' object has no attribute
body: <p>When I try to make migrations for the following models: </p>
  
  <pre><code>class Location(models.Model):
      name = models.CharField(max_length=200)
      latitude = models.FloatField
      longitude = models.FloatField
      altitude = models.IntegerField
  
      def _str_(self):
          return self.name
  
      def getLatitude(self):
          return self.latitude
  
      def getLongitude(self):
          return self.longitude
  
  class Distance(models.Model):
      placeA = models.ForeignKey(Location, on_delete=models.CASCADE)
      placeB = models.ForeignKey(Location, on_delete=models.CASCADE)
      placeAlatitude = placeA.getLatitude()
      placeBlatitude = placeB.getLatitude()
      placeAlongitude = Location.objects.select_related().get(placeA.longitude)
      placeBlongitude = Location.objects.select_related().get(placeB.longitude)
      distance = models.FloatField(default = 0.0)
  </code></pre>
  
  <p>I am getting the error: </p>
  
  <blockquote>
    <p>'ForeignKey' object has no attribute 'getLatitude'</p>
  </blockquote>
  
  <p>I get a similar error if I try to directly access the latitude directly (<code>placeA.latitude</code>)</p>
  
  <p>What am I doing wrong? I am new to using the Django framework.</p>