title: AttributeError : type object '_io.StringIO' has no attribute 'StringIO'
body: <p>In my model I want to format the imagefield by overridding the save method</p>
  
  <p>I have done this in my model</p>
  
  <pre><code>from PIL import Image as Img
  from io import StringIO
  from django.core.files.uploadedfile import InMemoryUploadedFile
  
  
  class Blog(models.Model):
      Blog_image= models.ImageField(upload_to="...", blank=True)
  
      def save(self, *args, **kwargs):
      if self.Blog_image:
          image = Img.open(StringIO.StringIO(self.Blog_image.read()))
          image.thumbnail((900,300), Img.ANTIALIAS)
          output = StringIO.StringIO()
          image.save(output, format='JPEG', quality=150)
          output.seek(0)
          self.Blog_image = InMemoryUploadedFile(output,'ImageField', "%s.jpg" %self.Blog_image.name, 'image/jpeg', output.len, None)
      super(Blog, self).save(*args, **kwargs)
  </code></pre>
  
  <p>But getting this Attribute error </p>
  
  <pre><code>AttributeError : type object '_io.StringIO' has no attribute 'StringIO'
  </code></pre>
  
  <p>Can anyone explain me why I am getting this error???</p>
  
  <p>My python version is 3.6.4</p>
  
  <p>My Django version is 2.0.7</p>