stephenmcd/django-forms-builder — pull request #48 by splatte (2012-02-17 13:20:55+00:00)
Title: fix: csv export appends to result on each iteration

Steps to reproduce:
- create new form
- add single-text field
- submit form more than once

When exporting entries as CSV, the resulting file will contain column headers as well as entries multiple times.

This is caused by `response.write()`being inside the for-loop, so that an interim result is appended to the reponse in each iteration. Looks like this part simply has wrong indentation.

I couldn't test the Excel compatibility that the code was originally introduced for but it shouldn't be affected by this patch.