def formset_view(request):
if request.method == '<STR_LIT:POST>':<EOL><INDENT>formset = TestFormSet(request.POST)<EOL>if formset.is_valid():<EOL><INDENT>t = Template('<STR_LIT>', name='<STR_LIT>')<EOL>c = Context()<EOL><DEDENT>else:<EOL><INDENT>t = Template('<STR_LIT>',<EOL>name='<STR_LIT>')<EOL>c = Context({'<STR_LIT>': formset})<EOL><DEDENT><DEDENT>else:<EOL><INDENT>formset = TestForm(request.GET)<EOL>t = Template('<STR_LIT>',<EOL>name='<STR_LIT>')<EOL>c = Context({'<STR_LIT>': formset})<EOL><DEDENT>return HttpResponse(t.render(c))<EOL>
A view that tests a simple formset