擅长:python、mysql、java
<p>你说过</p>
<blockquote>
<p>where the fruit_name is apples, or oranges, or strawberries</p>
</blockquote>
<p>以及</p>
<blockquote>
<p>so that it selects all of the items with any of the values in the list</p>
</blockquote>
<p>但您使用的是“<em>包含”过滤器。在</p>
<p>你需要找到子串吗,比如“坏草莓”?如果没有,您可以使用“\uuu in”过滤器,并降低整个问题的复杂性。在</p>
<pre><code>r.objects.filter(fruit_name__in=data['fruit_list'])
</code></pre>