

def get_prep_lookup(self, lookup_type, value):
    if hasattr(value, 'prepare'):
        return value.prepare()
    if hasattr(value, '_prepare'):
        return value._prepare()
    if (lookup_type in ['exact', 'gt', 'lt', 'gte', 'lte']):
        return self._pk_trace(value, 'get_prep_lookup', lookup_type)
    if (lookup_type in ('range', 'in')):
        return [value._pk_trace(v, 'get_prep_lookup', lookup_type) for v in value]
    elif (lookup_type == 'isnull'):
        return []
    raise TypeError(('Related Field has invalid lookup: %s' % lookup_type))

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/db/models/fields/related.py RelatedField.get_prep_lookup/VarMisuse@97/144 `self`->`value`