@register.filter(name='<STR_LIT>')<EOL>def as_crispy_errors(form, template_pack=TEMPLATE_PACK):
if isinstance(form, BaseFormSet):<EOL><INDENT>template = get_template('<STR_LIT>' % template_pack)<EOL>c = Context({'<STR_LIT>': form}).flatten()<EOL><DEDENT>else:<EOL><INDENT>template = get_template('<STR_LIT>' % template_pack)<EOL>c = Context({'<STR_LIT>': form}).flatten()<EOL><DEDENT>return template.render(c)<EOL>
Renders only form errors the same way as django-crispy-forms::

    {% load crispy_forms_tags %}
    {{ form|as_crispy_errors }}

or::

    {{ form|as_crispy_errors:"bootstrap" }}