Ejemplo n.º 1
0
 def get(self, post_id):
     json_out = json.dumps(to_dict(Blog.get_by_id(int(post_id))))
     self.response.headers["Content-Type"] = "application/json; charset=UTF-8"
     self.response.write(json_out)
Ejemplo n.º 2
0
 def get(self, post_id):
     blogs = []
     blogs.append(Blog.get_by_id(int(post_id)))
     self.render('blog.html', blogs=blogs, title='Permalink')