

def contribute_to_related_class(self, cls, related):
    if ((not related.rel.is_hidden()) and (not related.model._meta.swapped)):
        setattr(cls, related.get_accessor_name(), ForeignRelatedObjectsDescriptor(related))
        if self.rel.limit_choices_to:
            cls._meta.related_fkey_lookups.append(self.rel.limit_choices_to)
    if (self.rel.field_name is None):
        self.rel.field_name = cls._meta.pk.name

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/db/models/fields/related.py ForeignKey.contribute_to_related_class/VarMisuse@18/23 `self`->`related`