Ticket #9404: uploadedfile_stringio_proxies.diff

File uploadedfile_stringio_proxies.diff, 694 bytes (added by magneto, 16 years ago)

readlines, xreadlines, and iter

  • django/core/files/uploadedfile.py

     
    127127    # proxy methods to StringIO
    128128    def read(self, *args): return self._file.read(*args)
    129129    def seek(self, *args): return self._file.seek(*args)
     130    def xreadlines(self):           return iter(self._file)
     131    def __iter__(self):             return iter(self._file)
     132    def readlines(self, size=None): return self._file.readlines(size)
    130133    def tell(self, *args): return self._file.tell(*args)
    131134    def close(self):       return self._file.close()
Back to Top