使用包含

此查詢將獲取評級大於或等於零且小於 6 的所有圖書。

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