8👍
✅
rendering the formset.management_form in the template
{{fset.management_form}}
this allows the management form data available and hence data is complete.But if prefix is added while genarating formsets
adding prefix should fix that issue.
fset = ffact(request.POST,prefix='pfix')
8👍
Is the management data in request.POST
?
http://docs.djangoproject.com/en/dev/topics/forms/formsets/#understanding-the-managementform
The following info has to be in request.POST
:
data = {
'form-TOTAL_FORMS': u'1',
'form-INITIAL_FORMS': u'0',
'form-MAX_NUM_FORMS': u'',
}
There is a shortcut for rendering the hidden fields: {{ my_formset.management_form }}
- [Django]-Jquery mobile and dynamic page content
- [Django]-How to stop server ran in Daemon mode in Django?
- [Django]-Django – Alternatives To File Browser that Work Well With S3
- [Django]-How do I make Django admin URLs accessible to localhost only?
Source:stackexchange.com