def get_order_dir(field, default='ASC'):
    dirn = ORDER_DIR[default]
    if field[0] == '-':
        return field[1:], dirn[1]
    return field, dirn[0]
Returns the field name and direction for an order specification. For
dataset/ETHPy150Open django/django/django/db/models/sql/query.py/get_order_dir