Convert CSV download to CBV, cleaned up base.py

This commit is contained in:
2012-06-06 22:49:06 +01:00
parent ea33455b6a
commit 93aeb6df03
3 changed files with 27 additions and 23 deletions

View File

@@ -45,8 +45,8 @@ class CSVResponseMixin(object):
w.writerow(headings)
# Rows
for row in self.data:
row = [unicode(c).encode(charset, 'replace') for c in row.values()]
for row in self.get_csv_data():
row = [unicode(c).encode(charset, 'replace') for c in row]
w.writerow(row)
# Done