def write_form(self, post_id): post = Post.get_by_id(int(post_id)) qry1 = Comment.query() cursor = qry1.filter(Comment.post_id == int(post_id)) username = self.request.cookies.get('username') if username: render(self, 'post_page.html', post = post, post_id = int(post_id), username = username, cursor = cursor) else: render(self, 'post_page_2.html', post = post, post_id = int(post_id), cursor = cursor)