def orderingFilter(queryset, querydict, fields):
    try:
        ordering=querydict['ordering']
        if ordering.lstrip('-') in fields:
            orderlist = [ordering]
            queryset = queryset.order_by(*orderlist)
        
    except KeyError:
        pass
    
    return queryset
Only works if the ordering hasn't already been set. Which it hasn't, but...
dataset/ETHPy150Open sunlightlabs/read_FEC/fecreader/api/filters.py/orderingFilter