Templatetags

tapeforms.templatetags.tapeforms.form(context, form, **kwargs)[source]

The form template tag will render a tape-form enabled form using the template provided by get_layout_template method of the form using the context generated by get_layout_context method of the form.

Usage:

{% load tapeforms %}
{% form my_form %}

You can override the used layout template using the keyword argument using:

{% load tapeforms %}
{% form my_form using='other_form_layout_template.html' %}
Parameters:

form – The Django form to render.

Returns:

Rendered form (errors + hidden fields + fields) as HTML.

tapeforms.templatetags.tapeforms.formfield(context, bound_field, **kwargs)[source]

The formfield template tag will render a form field of a tape-form enabled form using the template provided by get_field_template method of the form together with the context generated by get_field_context method of the form.

Usage:

{% load tapeforms %}
{% formfield my_form.my_field %}

You can override the used field template using the keyword argument using:

{% load tapeforms %}
{% formfield my_form.my_field using='other_field_template.html' %}
Parameters:

bound_field – The BoundField from a Django form to render.

Returns:

Rendered field (label + widget + other stuff) as HTML.