def get(self,reactionId): blogReaction = WeblogReactions.get_by_id(int(reactionId)) template_values = { 'reaction': blogReaction, 'action': "deleteBlogReaction", } self.generate('blog_delete.html',template_values)
def post(self,reactionId): blogReaction= WeblogReactions.get_by_id(int(reactionId)) if(blogReaction is not None): db.delete(blogReaction) util.flushRecentReactions() self.redirect('/'+blogReaction.weblog.relative_permalink()) return
def post(self,reactionId): blogReaction= WeblogReactions.get_by_id(int(reactionId)) if(blogReaction is None): self.redirect('/') blogReaction.content = self.request.get('text_input') blogReaction.authorWebsite = self.request.get('website') user = users.get_current_user() if user is not None: blogReaction.lastModifiedBy = user blogReaction.authorEmail = str(user.email()) blogReaction.user = str(user.nickname()) else: blogReaction.authorEmail = self.request.get('mail') blogReaction.user = self.request.get('name_input') blogReaction.lastModifiedDate = datetime.datetime.now() blogReaction.put() self.redirect('/'+blogReaction.weblog.relative_permalink())