def prepare_headers(request, bound_columns):
    for column in bound_columns:
        if column.sortable:
            params = request.GET.copy()
            order = request.GET.get('order', None)
            start_sort_desc = column['sort_default_desc']
            params['order'] = column['name'] if not start_sort_desc else '-' + column['name']
            if order is not None:
                is_desc = len(order) > 0 and order[0] == '-'
                order_field = is_desc and order[1:] or order
                if order_field == column['name']:
                    new_order = is_desc and order[1:] or "-%s" % order
                    params['order'] = new_order
            column.is_sorting = False if order is None else (column.name == order or ('-' + column.name) == order)
            column.url = "?%s" % params.urlencode()
        else:
            column.is_sorting = False
    return bound_columns
Returns the Content-Type string matching extension of the given filename.
dataset/ETHPy150Open TriOptima/tri.table/lib/tri/table/__init__.py/prepare_headers--crossover with--dataset/ETHPy150Open uwdata/termite-data-server/web2py/gluon/contenttype.py/contenttype