<div data-formset="{{ formset.prefix }}">
  {{ formset.management_form }}
  <fieldset style="display: none">
    {{ formset.empty_form.as_div }}
  </fieldset>
  {% for form in formset %}
    <fieldset>
    {{ form.as_div }}
    </fieldset>
  {% endfor %}
</div>
<script>{{ formset.fancy_init }}</script>
