Пример #1
0
 def post(self):
     user = user_utils.get_user_from_rosefire_user(self.user())
     post = post_utils.get_post_by_id(int(self.request.get('post_id')))
     reply = Reply(parent=post.key,
                   author=user.key,
                   text=self.request.get('text'))
     reply.put()
     time.sleep(.5)
     self.redirect(self.request.referer)
Пример #2
0
 def post(self):
     cookie = self.request.cookies.get('user_id')
     username = utils.get_username_from_cookie(cookie)
     a = self.request.get("key")
     b = self.request.get("comment")
     a = a.replace(" ", "")
     u = Querydbase.gql("WHERE questionid = '%s'" % a).get()
     cor = Reply(post=a, author=username, text=b)
     cor.put()
     self.redirect('/showqu')