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