Hello All Due to some production environment related issues, I am not able to upgrade to 1.02 to get formsets.
I am able to create list of forms to emulate formset as suggested on http://collingrady.wordpress.com/2008/02/18/editing-multiple-objects-in-django-with-newforms/ However, I need something like this a) A form has few fields and there are five such foms. b) User just needs to fill in one or more forms. If I try to bound all the forms using request.POST, it will raise validation errors on the forms that have not been filled by the user [ which is actually okay ] my code in views.py def submitsession(request): if request.method == 'POST': #do something papers=[PaperInfo(request.POST,prefix=str(x)) for x in range (0,3)] #So even if papers[0] is correct and user has left papers[1] and papers[2] form empty, forms would NOT validate and User will be displayed error else: #do something papers=[PaperInfo(prefix=str(x)) for x in range (0,3)] return render_to_response('submitsession.html',{'paper1':papers [0],'paper2':papers[1],'paper3':papers[2]}) Question 1: How can i achieve the functionality that the any form should either if filled of left blank ? Question 2: i have to pass the list as papers[0] and so on to render_to_response .. I tried to pass it as papers and access it as papers[0].as_table in the template but it did not work? thanks -Atishay On Jan 17, 3:23 pm, Atishay <contactatis...@gmail.com> wrote: > Thank you all. I will upgrade to 1.02 as well. > > Regards > > Atishay > > On Jan 17, 2:18 pm, Daniel Roseman <roseman.dan...@googlemail.com> > wrote: > > > On Jan 17, 5:59 pm, Atishay <contactatis...@gmail.com> wrote: > > > > On Jan 16, 10:06 pm, "alex.gay...@gmail.com" <alex.gay...@gmail.com> > > > wrote: > > > > What version of Django are you using? > > > > 0.96 version > > > > if it does not have formset then how can we do something like formset > > > without defining multiple forms in forms.py > > > Upgrade to 1.02. Seriously. > > -- > > DR. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---