Snippet List
Counter tag. Can be used to output and increment a counter.
For usage, see docstring in the code.
This is the first complete tag that I've implemented, I hope that there are no bugs and that it's thread safe.
- incremental
- counter
- increment
- numbering
The first function (ftype_batch) is a view that passes the first part of the CSV filename and a queryset intended to write out to the file.
run_batch prepares the HttpResponse for incrementally writing, and write_batch actually writes out the data.
The logic in write_batch is custom to what I need done, but as long as the csv writer receives a sequence to write, it should work.
2 snippets posted so far.