

def get_related_field(self):
    "\n        Returns the Field in the 'to' object to which this relationship is\n        tied.\n        "
    data = self.to._meta.get_field_by_name(self.field_name)
    if (not data[2]):
        raise FieldDoesNotExist(("No related field named '%s'" % self.field_name))
    return data[0]

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/db/models/fields/related.py ManyToOneRel.get_related_field/original