示例#1
0
def photolog_create_image(fbuser,addr,img):
    if  img == None:
        return None
    logging.debug('photolog_create_image')
    if fbuser:
        newNode = ImageContent()
        if newNode:
            newNode.fb_owner = fbuser
            newNode.img_src = create_image_blob(img)
            logging.debug('add to blobk')
            newNode.ip_addr = addr
            newNode.iszombie = False
            newNode.put();
        else:
            newNode=None
    else:
        newNode=None
    return newNode;
示例#2
0
 def update_my_image(self, img):
     if  img:
         self.image = create_image_blob(img)
         self.put()