I have the same problem with django-uni-form. The csrf current is not displayed after the tag <form>if I use:
{% load uni_form_tags %}
{% uni_form form helper %}
or
{% load uni_form_tags %}
{% with form.helper as helper %}
{% uni_form form helper%}
{%endwith%}
If I turn it on manually, it works:
<form action='{{ request.path }}' method='POST' class="uniForm">{% csrf_token %}
{{ form|safe }}
</form>
I found a blog post that describes how to manually enable the csrf token:
helper = FormHelper()
csrf_token = Hidden(
name = 'csrfmiddlewaretoken',
value = request.META['CSRF_COOKIE'])
helper.add_input(csrf_token)
Not at all, but at least he gets unification.
kchan source
share