{% csrf_token %}
{% for field in form %}
    <div class="mb-3">
    <label for="{{ field.id_for_label }}" class="form-label">{{ field.label }}</label>
    {{ field }}
    {% if field.help_text %}
        <small class="form-text d-block text-muted mt-1">{{ field.help_text }}</small>
    {% endif %}
    {% for error in field.errors %}
        <div class="invalid-feedback">
            {{ error }}
        </div>
    {% endfor %}
    </div>
{% endfor %}

{% if form.non_field_errors %}
    <div class="alert alert-danger">
        {% for error in form.non_field_errors %}
            {{ error }}
        {% endfor %}
    </div>
{% endif %}