title: Using Djangos ImageField to upload an image, rename it to a random filename and create thumbnail
body: <p>Hay guys, I've wrote a simple upload method for my pictures</p>
  
  <pre><code>class Picture(models.Model):
      path = models.CharField(max_length=200)
      filename = models.CharField(max_length=200)
      car = models.ForeignKey('Car')
      thumb_path = models.CharField(max_length=200)
      created_on = models.DateField(auto_now_add=True)
      updated_on = models.DateField(auto_now=True)
  
      def save(self):
          if not self.id:
              thumb_size = 128, 128
              thumb_path = "assests/uploads/thumb"+self.filename
              t = Image.open(self.path)
              t.thumbnail(thumb_size,Image.ANTIALIAS)
              t.save(thumb_path, "JPEG")
          self.thumb_path = thumb_path
          super(Picture, self).save()
  
      def delete(self):
          os.unlink(self.thumb_path)
          os.unlink(self.path)
          super(Picture, self).delete()
  </code></pre>
  
  <p>As you can see this isn't the best method, i want to move on to the ImageField() to do most of my work, but i still want the flexiability to create a thumbnail and random filename.</p>
  
  <p>would i need to create another model for PictureThumbnail? I don't really want to use any 3rd part extensions. </p>
  
  <p>how could i use ImageField to make this work? All the iamges are gong to be uploaded to /assests/uploads/</p>
  
  <p>Thanks</p>