title: How to iterate over a formset in django?
body: <p>This is my views.py:  </p>
  
  <pre><code># Create your views here.
  def codepost(request):
  if request.method == 'POST':
      form=CodeFormSet(request.POST)
      if form.is_valid():
          datan = ""
          for forms in form.ordered_forms:
              data = forms.cleaned_data['code']   
              datan = datan + data
          return render_to_response('submissiondone.html', {'data':datan})
  else:
      form = CodeFormSet()
      data1=QuestionBase.objects.get(pk=1)
      #form.append(data1.text)
      #data1 = mform.text
      csrfContext = RequestContext(request)
  return render_to_response('quesdisp.html', {'form': form})
  </code></pre>
  
  <p>This gives an addition ORDER field which I don't want. So, how do I iterate over a formset? If I remove the can_order = true from the formset, then it is not recognizing "code" as a valid input. </p>
  
  <p>Thus, how do I iterate over this? </p>
  
  <p>Edit:
  This is the formest part of my forms.py:</p>
  
  <pre><code>from django import forms
  from django.forms.formsets import formset_factory
  
  class CodeForm(forms.Form):
      code = forms.CharField(widget = forms.Textarea)
  
  
  CodeFormSet = formset_factory(CodeForm, extra = 5, )
  </code></pre>