I used formsets for different forms in my project, it displays the forms to user but on submitting the form it gives the following error: 'chem_analysisFormFormSet' object has no attribute 'save'. I don't know how to save the formset in the views. Here is the code of my views file of my project:
def chemical_analysis(request): ChemicalFormSet = formset_factory(chem_analysisForm) if request.method=='POST': formset = ChemicalFormSet(request.POST, request.FILES) if formset.is_valid(): cd = formset.cleaned_data formset.save() return HttpResponseRedirect(reverse('Automation.report.views.result_chem')) #return render_to_response('report/chemical_analysis.html', {'chem': chem,},context_instance=RequestContext(request)) else: return HttpResponse("There was an error with your submission. Please try again.") else: formset = ChemicalFormSet() return render_to_response('report/report_add_row.html', {'formset': formset}, context_instance=RequestContext(request)) -- Satinderpal Singh http://satindergoraya.blogspot.in/ http://satindergoraya91.blogspot.in/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.