使用包含

此查询将获取评级大于或等于零且小于 6 的所有图书。

all_books = Book.objects.filter(ratings_range_contained_by=(0, 6))