

def select_related_descend(field, restricted, requested, reverse=False):
    '\n    Returns True if this field should be used to descend deeper for\n    select_related() purposes. Used by both the query construction code\n    (sql.query.fill_related_selections()) and the model instance creation code\n    (query.get_cached_row()).\n\n    Arguments:\n     * field - the field to be checked\n     * restricted - a boolean field, indicating if the field list has been\n       manually restricted using a requested clause)\n     * requested - The select_related() dictionary.\n     * reverse - boolean, True if we are checking a reverse select related\n    '
    if (not field.rel):
        return False
    if (field.rel.parent_link and (not reverse)):
        return False
    if restricted:
        if (field and (field.related_query_name() not in requested)):
            return False
        if ((not reverse) and (field.name not in requested)):
            return False
    if ((not restricted) and field.null):
        return False
    return True

dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/db/models/query_utils.py select_related_descend/VarMisuse@61/276 `reverse`->`field`