Note: Your "novice Django skills" are irrelevant -- working with CSV files in
Django is nothing more than Python. Just check out the docs and examples on the
Python CSV module. You'll enjoy working with Python (and Django) a lot more if
you take the time to read a book or two, do tutorials, and generally
familiarize yourself with the language and framework. You'll also be a lot
better at it.
The only "Django" bit to the whole thing is the download part. I'll give you a
few lines of code that I use to give the user an Excel file as a download when
they run a report. You should be able to easily modify it to serve a CSV file.
xls_response = HttpResponse(mimetype="application/ms-excel")
xls_response['Content-Disposition'] = 'attachment;
filename=Reimbursement_Report_%s_to_%s.xls' % (start_date, end_date)
#note: 'xls' here is an Excel spreadsheet created by xlwt
xls.save(xls_response)
return xls_response
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.