Esempio n. 1
0
 def post(self, comment):
     """ Edit comment via POST """
     comment = Comment.get(comment)
     if UserData.current().user_id == comment.user.user_id:
         comment.body = self.request.get('value')
         comment.put()
         self.response.write(comment.body)
Esempio n. 2
0
 def get(self, comment):
     """ Delete comment via GET """
     user = UserData.current()
     comment = Comment.get(comment)
     if user.developer or user.moderator \
             or user.user_id == comment.user.user_id:
         comment.delete()
         self.response.write("Deleted")