{# @description The form element: CSRF token, multipart detection, and an optional rendered form. #} {# @prop form-obj:text | description:"A Django form to render via c-mvp.form.render." #} {# @prop formset:text | description:"A formset whose multipart-ness feeds encoding detection; not rendered by this component." #} {# @prop inlines:text | description:"A list of inline formsets whose multipart-ness feeds encoding detection; not rendered by this component." #} {# @slot Form fields and controls — The form's body content. #} {% load mvp %}
{% if method|lower == "post" %} {% csrf_token %} {% endif %} {% if form_obj %}{% endif %} {{ slot }}