models.py StringIO update for Py3