Permalink
Browse files

should be working now

  • Loading branch information...
1 parent 4382645 commit 4e321be86f5a2ef43798ef7addef71f557e570c0 @digi604 committed May 31, 2010
Showing with 4 additions and 0 deletions.
  1. +2 −0 uni_form/templates/uni_form/whole_uni_form_set.html
  2. +2 −0 uni_form/templatetags/uni_form_tags.py
View
2 uni_form/templates/uni_form/whole_uni_form_set.html
@@ -1,6 +1,8 @@
{% load uni_form_tags i18n %}
<form action="{{ form_action }}" class="uniForm {{ form_class }}" method="{{ form_method }}"{% if form_id %} id="{{ form_id|slugify }}"{% endif %}{% if formset.is_multipart %} enctype="multipart/form-data"{% endif %}>
+ {% csrf_token %}
+ {{ formset.management_form|as_uni_form }}
<fieldset class="inlineLabels">
<legend>* {% trans "Required fields" %}</legend>
{% for form in formset.forms %}
View
2 uni_form/templatetags/uni_form_tags.py
@@ -217,6 +217,8 @@ def get_response_context(self, context, helper, helper_attrs):
if helper and helper.layout:
for form in actual_formset.forms:
form.form_html = helper.render_layout(form)
+ if not is_old_django and context.has_key('csrf_token'):
+ response_dict['csrf_token'] = context['csrf_token']
return response_dict

0 comments on commit 4e321be

Please sign in to comment.