 <p>Basic pseudocode to generate and return csv:</p> <pre><code>import csv from django.http import HttpResponse def csv(self): response = HttpResponse(content_type='text/csv') filename = u"fizzer.csv" response['Content-Disposition'] = u'attachment; filename="{0}"'.format(filename) writer = csv.writer( response, delimiter=';', quotechar='"', quoting=csv.QUOTE_ALL ) for f in Fizzer.objects.all(): writer.writerow([f.foo, f.bar]) return response </code></pre> <p>Keynotes:</p> <ul> <li><p>You have to create <code>HttpResponse</code> object with <code>text/csv</code> content type</p></li> <li><p>generate your .csv with Python's <code>csv</code> module</p></li> <li><p>convert queryset to csv values</p></li> <li><p>return response</p></li> </ul>