title: filter using Q object with dynamic from user?
body: <p>In my views.py I have a method:</p>
  
  <pre><code>#......
  def get_filter_result(self, customer_type, tag_selected):
          list_customer_filter=[]
          customers_filter = Customer.objects.filter(Q(type__name=customer_type),
                                                     Q(active=True),
                                                     Q(tag__id=tag_selected))
  
          for customer_filter in customers_filter:
                      customer_filter.list_authorize_sale_type = sale_type_selected(customer_filter.authorize_sale_type)
                      list_customer_filter.append(customer_filter)
          return list_customer_filter
  </code></pre>
  
  <p>**My case tag_selected is the checkbox values that user checked
  I have a problems with tag_selected(is the list=1,2,3,...) that pass from my url</p>
  
  <pre><code>/?customer_type=TDO&amp;tag=2 ===&gt;filter okay
  /?customer_type=TDO&amp;tag=3 ===&gt;filter okay
  ?customer_type=TDO&amp;tag=2,3 ===&gt;How Can I add And condition in filter?
  </code></pre>
  
  <p>for example </p>
  
  <pre><code>if len(tag_selected)==1:
        customers_filter = Customer.objects.filter(Q(type__name=customer_type),
                                                         Q(active=True),
                                                         Q(tag__id=tag_selected))
  else:
      customers_filter = Customer.objects.filter(Q(type__name=customer_type),
                                                         Q(active=True),
                                                         Q(tag__id=tag_selected[0])
                                                         Q(tag__id=tag_selected[1])
                                                         Q(tag__id=tag_selected[2])
                                                         ...
                                                          )
  </code></pre>