'Returns a new QuerySet instance with the ordering changed.'

def order_by(self, *field_names):

    obj = self._clone()
    obj._clear_ordering()
    for field in field_names:
        if field.startswith('-'):
            obj._ordering.append({field.lstrip('-').replace('__', '.'): 'desc'})
        else:
            obj._ordering.append({field: 'asc'})
    return obj
