Re: Nested formsets at Django 1.3
The validation error happens when the formset is passed an empty dictionary. The docs (release notes for 1.3) suggest passing None instead. So doing this should fix the problem:
TenantFormset(data=self.data or None, instance=instance, prefix='TENANTS_%s' % pk_value)
In my case, which is similar to Nathan's, this made the validation error to go away.
-- You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ZHnO7qM0OJoJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home