def form(context, form, **kwargs):
    """
    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' %}

    :param form: The Django form to render.
    :return: Rendered form (errors + hidden fields + fields) as HTML.
    """

    if not isinstance(form, (forms.BaseForm, TapeformFieldset)):
        raise template.TemplateSyntaxError(
            'Provided form should be a `Form` instance, actual type: {0}'.format(
                form.__class__.__name__))

    return render_to_string(
        form.get_layout_template(kwargs.get('using', None)),
        form.get_layout_context(),
    )
def form ( context , form , ** kwargs ) : if not isinstance ( form , ( forms . BaseForm , TapeformFieldset ) ) : raise template . TemplateSyntaxError ( 'Provided form should be a `Form` instance, actual type: {0}' . format ( form . __class__ . __name__ ) ) return render_to_string ( form . get_layout_template ( kwargs . get ( 'using' , None ) ) , form . get_layout_context ( ) , )
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' %}

    :param form: The Django form to render.
    :return: Rendered form (errors + hidden fields + fields) as HTML.