def order_by(self, *field_names):
        assert self.query.can_filter(), \
            "Cannot reorder a query once a slice has been taken."
        obj = self._clone()
        obj.query.clear_ordering(force_empty=False)
        obj.query.add_ordering(*field_names)
        return obj
Returns a new QuerySet instance with the ordering changed.
dataset/ETHPy150Open django/django/django/db/models/query.py/QuerySet.order_by