Example #1
0
    def get(self):
        comments = data.get_comments()
        jsonStr = tornado.escape.json_encode(comments)

        self.set_header('Content-Type', 'application/json')
        self.write(jsonStr)
        self.finish()
Example #2
0
    def get(self):
        comments = data.get_comments()
        jsonStr = tornado.escape.json_encode(comments)

        self.set_header('Content-Type', 'application/json')
        self.write(jsonStr)
        self.finish()
Example #3
0
 def get(self, index):
     self.render('blog.html',
                 blog=data.get_blog(),
                 comments=data.get_comments(),
                 user=self.get_secure_cookie("user"))
Example #4
0
 def get(self, index):
     self.render('blog.html', blog=data.get_blog(),
                  comments=data.get_comments(),
                  user=self.get_secure_cookie("user"))