Example #1
0
    def handle_edit_comment(self, str_new_comment, str_comment_id, str_post_id, str_user_id):

        if not str_new_comment:
            return self.render_front(str_user_id,
                                     str_post_id,
                                     "Your Comment may not be empty")
        else:
            # get original comment and adjust
            comment = Comment.by_id(int(str_comment_id))
            comment.text = str_new_comment
            comment.put()
            return self.delayed_render_front(str_user_id)
Example #2
0
    def handle_edit_comment(self, str_new_comment, str_comment_id, str_post_id,
                            str_user_id):

        if not str_new_comment:
            return self.render_front(str_user_id, str_post_id,
                                     "Your Comment may not be empty")
        else:
            # get original comment and adjust
            comment = Comment.by_id(int(str_comment_id))
            comment.text = str_new_comment
            comment.put()
            return self.delayed_render_front(str_user_id)
Example #3
0
    def handle_delete_comment(self, str_comment_id, str_user_id):
        # get original comment and delete
        comment = Comment.by_id(int(str_comment_id))
        comment.delete()

        return self.delayed_render_front(str_user_id)
Example #4
0
    def handle_delete_comment(self, str_comment_id, str_user_id):
        # get original comment and delete
        comment = Comment.by_id(int(str_comment_id))
        comment.delete()

        return self.delayed_render_front(str_user_id)