def post(self, opinion_id): opinion = Opinion.get_by_id(int(opinion_id)) opinion.name = self.request.get("name") opinion.email = self.request.get("email") opinion.opinion = self.request.get("opinion") opinion.put() return self.redirect("/opinions")
def post(self, opinion_id): opinion = Opinion.get_by_id(int(opinion_id)) opinion.deleted = True opinion.put() return self.redirect("/opinions")
def get(self, opinion_id): opinion = Opinion.get_by_id(int(opinion_id)) params = {"opinion": opinion} return self.render_template("delete-opinion.html", params)
def post(self, opinion_id): opinion = Opinion.get_by_id(int(opinion_id)) opinion.key.delete() return self.redirect("/deleted")
def get(self, opinion_id): if not users.is_current_user_admin(): return self.write("You are not admin!") opinion = Opinion.get_by_id(int(opinion_id)) params = {"opinion": opinion} return self.render_template("complete-delete.html", params)