阅读背景:

如何在数据库中存储应用程序引擎Image对象?

来源:互联网 

I'm a bit stuck with my code:

我的代码有点困惑:

def setVenueImage(img):
  img = images.Image(img.read())
  x, y = photo_utils.getIdealResolution(img.width, img.height)
  img.resize(x, y)
  img.execute_transforms()
  venue_obj = getVenueSingletonObject()
  if venue_obj is None:
      venue_obj = Venue(images = [img])
  else:
      venue_obj.images.append(img)
  db.put(venue_obj)
def



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: