title: django dynamic forms based on query result in one template
body: <p>I have a requirement which a bit new on this django framework. i have been searching alot but couldnt find.</p>
  
  <pre><code>&lt;h2&gt; Main Table &lt;/h2&gt;
  
  ID = Primary Key
  Position= CharField
  
  &lt;h2&gt; Child Table &lt;/h2&gt;
  
  position=foreignkey(main table)
  employee=CharField
  attendance=CharField
  </code></pre>
  
  <p>Scenario</p>
  
  <p>I have a listview with following data as an example in the template.</p>
  
  <pre><code>&lt;Table&gt; 
  &lt;th&gt; ID &lt;/th&gt;
  &lt;th&gt; Position&lt;/th&gt;
  &lt;th&gt; Update &lt;/th&gt;
  &lt;td&gt;1&lt;/td&gt;
  &lt;td&gt;Manager&lt;/td&gt;
  &lt;td&gt;&lt;a href="#"&gt;Click &lt;/a&gt; &lt;/td&gt;
  &lt;tr&gt;&lt;/tr&gt;
  &lt;td&gt;2&lt;/td&gt;
  &lt;td&gt;Staff&lt;/td&gt;
  &lt;td&gt;&lt;a href="#"&gt;Click &lt;/a&gt; &lt;/td&gt;
  &lt;/table&gt;
  </code></pre>
  
  <h3> I need to create dynamic forms in the update template based on child table rows in a data grid to update attendance </h3>