This is a sample on how to stream the results of a large QuerySet into a CSV file using Django StreamingHttpResponse
class.
- Add the
CSVStream
class in your project, for example awriters.py
file:
import csv
from django.http import StreamingHttpResponse