File: whole_uni_formset.html

package info (click to toggle)
python-crispy-bootstrap5 2024.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 664 kB
  • sloc: python: 1,949; sh: 6; makefile: 3
file content (30 lines) | stat: -rw-r--r-- 844 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{% load crispy_forms_tags %}
{% load crispy_forms_utils %}

{% specialspaceless %}
{% if formset_tag %}
<form {{ flat_attrs }} method="{{ form_method }}" {% if formset.is_multipart %} enctype="multipart/form-data"{% endif %}>
{% endif %}
    {% if formset_method|lower == 'post' and not disable_csrf %}
        {% csrf_token %}
    {% endif %}

    <div>
        {{ formset.management_form|crispy }}
    </div>

    {% include "bootstrap5/errors_formset.html" %}

    {% for form in formset %}
        {% include "bootstrap5/display_form.html" %}
    {% endfor %}

    {% if inputs %}
        <div class="form-actions">
            {% for input in inputs %}
                {% include "bootstrap5/layout/baseinput.html" %}
            {% endfor %}
        </div>
    {% endif %}
{% if formset_tag %}</form>{% endif %}
{% endspecialspaceless %}