예제 #1
0
    def save (self):
        if (self.itemexists() == False):
            if (hasattr(self.author.meta, 'id') == False):
                authorid = Util.generatebase64uuid()
                self.author.meta.id = authorid
            Util.puttextobjectinazure(self.author.meta.id, self.url, self.html)
        else:
            self.author.meta.id = self.itemid

        self.author.save()
        return self.author.meta.id
예제 #2
0
    def save (self):
        if (self.itemexists() == False):
            blogid = Util.generatebase64uuid()
            Util.puttextobjectinazure(blogid, self.url, self.html)
            self.blog.meta.id = blogid

            if (hasattr(self.blog, 'thumbnailimage') and self.blog.thumbnailimage):
                Util.resizeimageandputinazure(self.blog.meta.id, self.blog.thumbnailimage)
        else:
            self.blog.meta.id = self.itemid

        self.blog.save()
        return self.blog.meta.id
예제 #3
0
    def setauthor (self, author):

        if (hasattr(author.meta, 'id') == False):
            authorid = Util.generatebase64uuid()
            author.meta.id = authorid

        self.author = {
            'id' : author.meta.id,
            'url' : author.url,
            'username' : author.username,
            'photo' : author.photo,
            'blogcount' : author.blogcount
        }