title: How to create such a table with checkbox in django?
body: <p>I want to have a table with a checkbox on each row with Django as shown in the image. My Django view.py, models.py and HTML file are mentioned below. How this can be done? Is there any built-in function in Django or what?</p>
  
  <p><a href="https://i.stack.imgur.com/6x5mK.png" rel="nofollow noreferrer">Table with check box</a></p>
  
  <p>I have models file as:</p>
  
  <pre><code>class AppsDescription(db.Model):
      aws_response = aws_list_conf_api_call()
  
      CHOICES = [("yes", "YES"),
             ("no", "NO")]
      OPTIONS = list()
  
      for apps in aws_response:
          OPTIONS.append(('{name1}'.format(name1=apps.lower()), '{name2}'.format(name2=apps)), )
  
      name = db.CharField(max_length=256)
      description = db.TextField()
      plan_to_migrate = db.CharField(choices=CHOICES, max_length=256)
      # app_names = MultiSelectField(choices=OPTIONS)
  
      def __str__(self):
          return self.name
  </code></pre>
  
  <p>My views.py as</p>
  
  <pre><code>def createapp(request):
      # import ipdb; ipdb.set_trace()
      form = DashboardForm()
  
      if request.method == "POST":
          form = DashboardForm(request.POST)
          list_of_inputs = request.POST.getlist("inputs")
  
          if form.is_valid:
              form.save(commit=True)
              return HttpResponseRedirect(reverse("aws:createapp"))
  
      server = aws_server_list_conf()
  
      return render(request, "createapp.html", {'server':server, 'form': form})
  </code></pre>
  
  <p>My html file as</p>
  
  <pre><code>&lt;form method="POST"&gt;
        {{form.as_p}}
  
        &lt;table&gt;
          &lt;tr&gt;
            &lt;th&gt;Select&lt;/th&gt;
            &lt;th&gt;Agent ID&lt;/th&gt;
            &lt;th&gt;Configuration ID&lt;/th&gt;
            &lt;th&gt;Host Name&lt;/th&gt;
            &lt;th&gt;OS Name&lt;/th&gt;
            &lt;th&gt;OS Version&lt;/th&gt;
            &lt;th&gt;Source&lt;/th&gt;
            &lt;th&gt;Time of Creation&lt;/th&gt;
            &lt;th&gt;Type&lt;/th&gt;
          &lt;/tr&gt;
  
          {% for apps in server %}
          &lt;tr&gt;
  
  
            &lt;td&gt;&lt;input type="checkbox" name="" value=""&gt;&lt;/td&gt;
  
            {% for k,v in apps.items %}
  
            &lt;td&gt;{{ v }}&lt;/td&gt;
  
            {% endfor %}
  
          &lt;/tr&gt;
          {% endfor %}
  
        &lt;/table&gt;
  
  
  
  
        {% csrf_token %}
        &lt;input type="submit" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal" name="" value="submit"&gt;
        &lt;div class="modal fade" id="myModal" role="dialog"&gt;
          &lt;div class="modal-dialog"&gt;
              &lt;div class="alert alert-success alert-dismissible"&gt;
                  &lt;a  class="close" data-dismiss="modal" aria-label="close"&gt;&amp;times;&lt;/a&gt;
                  &lt;strong&gt;Success!&lt;/strong&gt; App information stored Successfully.
                &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
        &lt;/form&gt;
  </code></pre>
  
  <p>I want to have a table with checkbox on each row with django as shown in the image. </p>