Ejemplo n.º 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()
Ejemplo n.º 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()
Ejemplo n.º 3
0
 def get(self, index):
     self.render('blog.html',
                 blog=data.get_blog(),
                 comments=data.get_comments(),
                 user=self.get_secure_cookie("user"))
Ejemplo n.º 4
0
 def get(self, index):
     self.render('blog.html', blog=data.get_blog(),
                  comments=data.get_comments(),
                  user=self.get_secure_cookie("user"))