Пример #1
0
    def render(self):
        self._render_text = self.content.replace('\n', '<br>')
        self.likecount = LikeCount.all().filter('blog_id = ',
                                                str(self.key().id())).get()
        self.comments = Comment.render(self.key().id())

        if self.likecount:
            countval = self.likecount.count

        else:
            countval = 0

        return render_str("post.html",
                          p=self,
                          count=countval,
                          comment=self.comments)