def put(self):
   thumb = db.Blob(resize_to(self.file, 222, 152))
   
   self.file  = thumb
   #self.imgname = 'gallery.jpg'
   
   key = super(Gallery, self).put()
   # do something after save
   return key
 def put(self):
   #resize file to fit max dimensions
   self.file  = resize_to_max(self.file, 600, 600)
   #create thumbs
   t_s = db.Blob(flickr_thumb(self.file, 100))
   t_m = db.Blob(flickr_thumb(self.file, 200))
   t_w = db.Blob(resize_to(self.file, 321, 110))
   #print t_s
   self.thumb_s  = t_s
   self.thumb_m  = t_m
   self.thumb_w  = t_w
   
   key = super(File, self).put()
   # do something after save
   return key