title: pass value to bootstrap modal form with django
body: <p>When I use bootstrap modal for my form its only show first value.</p>
  
  <p>here my <code>template.html</code></p>
  
  <pre><code>{% for company in companys %}
  &lt;tr&gt;
      &lt;td&gt;{{ company.name }}&lt;/td&gt;
      &lt;td&gt;{{ company.desc }}&lt;/td&gt;
      &lt;td align="center"&gt;
          &lt;button type="button" class="btn btn-warning margin-bottom" data-toggle="modal" data-target="#modal-default2"&gt;
              delete
          &lt;/button&gt;
  
          &lt;div class="modal fade" id="modal-default2"&gt;
              &lt;div class="modal-dialog"&gt;
  
                  &lt;form method="post" action="{% url 'system:company_delete' pk=company.pk %}"&gt;
                  {% csrf_token %}
  
                  &lt;div class="modal-content"&gt;    
                      &lt;div class="modal-body"&gt;
                          &lt;input type="text" name="name" maxlength="100" required="" id="id_name" value="{{ company.pk }}"&gt;
                          &lt;input type="submit" class="btn btn-primary" value="Delete"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;/form&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  
  {% endfor %}
  </code></pre>
  
  <p>its loop all the data, when click <code>delete</code> confirm form will popup. but its return same value.</p>
  
  <p>but if without modal-bootstrap its work fine.</p>
  
  <p>example: <code>template.html</code></p>
  
  <pre><code>{% for company in companys %}
  &lt;tr&gt;
      &lt;td&gt;{{ company.name }}&lt;/td&gt;
      &lt;td&gt;{{ company.desc }}&lt;/td&gt;
      &lt;td align="center"&gt;
          &lt;form method="post" action="{% url 'system:company_delete' pk=company.pk %}"&gt;
              {% csrf_token %}
              &lt;input type="text" name="name" maxlength="100" required="" id="id_name" value="{{ company.pk }}"&gt;
              &lt;input type="submit" class="btn btn-primary" value="Delete"&gt;
          &lt;/form&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  
  {% endfor %}
  </code></pre>
  
  <p>it's work fine.</p>
  
  <p>what I should do to make it work?...</p>
  
  <p><strong><em>update</em></strong> </p>
  
  <p><code>views.py</code></p>
  
  <pre><code># Company Crud
  class CompanyListView(ListView):
      context_object_name = 'companys'
      model = models.Company
  
  class CompanyCreateView(CreateView):
      fields = ('name', 'desc')
      model = models.Company
  
  class CompanyUpdateView(UpdateView):
      fields = ('name', 'desc')
      model = models.Company
  
  class CompanyDeleteView(DeleteView):
      model = models.Company
      success_url = reverse_lazy("system:company_list")
  </code></pre>