<form{{ form.attrs }}>{% if form.attrs.method == 'post' %}<input type="hidden" name="csrfmiddlewaretoken" value="{{csrf_token}}"/>{% endif %}

    {{ form.h_tag }}

    {% block before_fields %}{% endblock %}

    {{ form.errors }}
    {{ form.render_fields }}
    {{ form.render_actions }}
</form>
