django/django — pull request #415 by doda (2012-09-30 23:40:34+00:00)
Title: Fixed #18972 - Used xrange to chunk data

This makes the code more `modern` although imo the whole thing could do without checking for length and just do in either case

```python
for offset in xrange(0, length, max_chunk_size):
self._write(data[offset:offset+max_chunk_size])
self._flush()
```