title: How to render formset in template django and create vertical table?
body: <p>How to create this table used formset and extra=3?</p>
  
  <p>Table:</p>
  
  <pre><code>| my name first column | second column | third column | fourth column |
  
  | formset1.field1.label | formset1.field1 | formset2.field1 | formset3.field1 |
  
  | formset1.field2.label | formset1.field2 | formset2.field2 | formset3.field2 |
  
  | formset1.field3.label | formset1.field3 | formset2.field3 | formset3.field3 |
  
  | formset1.field4.label | formset1.field4 | formset2.field4 | formset3.field4 |
  </code></pre>
  
  <p>In view I create standard formset:</p>
  
  <pre><code>def my_view(request, id_object):
      getobject = get_object_or_404(Model, id=id_object)
      FormSetInit = inlineformset_factory(Model, Model2, form=FormModel2, extra=3)
      FormSet = FormSetInit(instance=getobject, prefix='model2')
      response = {}
      response['Formset'] = FormSet
      return render_to_response('my_template.html', response)
  </code></pre>
  
  <p>In template 'my_template.html' i try used this:</p>
  
  <pre><code>&lt;table&gt;
  {% for form in Formset %}
    {% if forloop.counter == 1 %}
      {% for field in form %}
        {% if forloop.counter &lt; 8 %}
          &lt;tr&gt;
            &lt;td class="first"&gt;{{ field.label }}&lt;/td&gt;
            &lt;td&gt;{{ field }}&lt;/td&gt;
            &lt;td&gt;{{ field }}&lt;/td&gt;
            &lt;td class="last"&gt;{{ field }}&lt;/td&gt;
            {% if forloop.counter !=  7 %}
              &lt;/tr&gt;
            {% endif %}
        {% else %}
          {{ field }}
          {% if forloop.last %} &lt;/tr&gt; {% endif %}
        {% endif %}
      {% endfor %}
    {% endif %}
  {% endfor %}
  &lt;/table&gt;
  </code></pre>
  
  <p>But this not a good idea.. :/</p>