如何使用django从选择标签中获取数据

how to get data from selection tag with django

我尝试实现过滤器功能以使用 post 形式从选择标签中获取数据,但结果始终是 None

view.py

def filter(request):
    products = Product.objects.all()
    if request.method == 'POST':
      title = request.POST.get('da',None)
      print(title)
      titre = Product.objects.filter(title=title)
      print(titre)
      return render(request, 'searchapp/searchview.html', {'qs': titre})

    else:
     return render(request,'searchapp/searchview.html',{'qs':products})

html :

div>
    <form action="{% url 'search:query' %}" method="post" enctype="multipart/form-data">
      {% csrf_token %}
            <div class="form-group">
                <label>Title</label>
                  <select title="da" class="form-control">
                        {% for obj in qs %}
                 <option value="{{obj}}">{{obj}}</option>
                         {%endfor%}
                         </select>
            </div>
            <button type="submit" class="btn btn-warning btn-lg">Add Product</button>
        </form>
</div>

在 select.

中使用 name='da' 而不是 title 属性