Обработка 2 форм на одной странице

Не могу разобраться как обрабатывать 2 формы с одной страницы.Подскажите плс.

views.py

def products(request):
if request.method == 'POST':
    form = UploadFileForm(request.POST, request.FILES)
    if form.is_valid():
        handle_uploaded_file(request.FILES['file'])

else:
    form = UploadFileForm()
return render(request, 'market/site_page.html', {'products': Product.objects.all()})

вот так мой шаблон выглядит

<body>

<div class="container">
  <form enctype="multipart/form-data" method="post" >{% csrf_token %}
   <p><input type="file" name="file">
   <input type="submit" value="Отправить"></p>
  </form>
  <table class="table table-hover">
    <thead>
      <tr>
        <th>id product</th>
        <th>title</th>
        <th>price</th>
          <th>url</th>
          <th>description</th>
          <th>category</th>
          <th>rating reviews</th>
           <th>brand</th>
          <th>amount</th>
          <th>delivery price</th>
          <th>How match</th>

      </tr>
    </thead>
    <tbody>
    {% for product in products %}
      <tr>
          <td>{{ product.id_product }}</td>
          <td>{{ product.title }}</td>
          <td>{{ product.price }}</td>
          <td>{{ product.url }}</td>
          <td>{{ product.description }}</td>
          <td>{{ product.category }}</td>
          <td>{{ product.rating_reviews }}</td>
          <td>{{ product.brand }}</td>
          <td>{{ product.amount }}</td>
          <td>{{ product.delivery_price }}</td>
          <td><form enctype="text/plain" method="post" >{% csrf_token %}
   <p><input type="text" name="text">
   <input type="submit" value="In Cart"></p>
  </form><td>
          {%endfor%}
      </tr>
    </tbody>
  </table>
</div>

</body>

первую форму обрабатываю читаю файл и так далее,а вот как вторую обработать не пойму


Ответы (0 шт):