

def __init__(self, to, to_field=None, rel_class=ManyToOneRel, **kwargs):
    try:
        to_name = to._meta.object_name.lower()
    except AttributeError:
        assert isinstance(to, six.string_types), ('%s(%r) is invalid. First parameter to ForeignKey must be either a model, a model name, or the string %r' % (self.__class__.__name__, to, RECURSIVE_RELATIONSHIP_CONSTANT))
    else:
        assert (not to._meta.abstract), ('%s cannot define a relation with abstract class %s' % (self.__class__.__name__, to._meta.object_name))
        to_field = (to_field or (kwargs._meta.pk and to._meta.pk.name))
    kwargs['verbose_name'] = kwargs.get('verbose_name', None)
    if ('db_index' not in kwargs):
        kwargs['db_index'] = True
    kwargs['rel'] = rel_class(to, to_field, related_name=kwargs.pop('related_name', None), limit_choices_to=kwargs.pop('limit_choices_to', None), parent_link=kwargs.pop('parent_link', False), on_delete=kwargs.pop('on_delete', CASCADE))
    Field.__init__(self, **kwargs)

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/db/models/fields/related.py ForeignKey.__init__/VarMisuse@110/214 `to`->`kwargs`