def post(self): team_key = self.request.get('team_key') undo = self.request.get('undo') if undo == '1': unvote(users.get_current_user(), team_key) else: is_local = self.request.get('local') # TODO: Verify local vote(users.get_current_user(), team_key, is_local) self.render('vote_received', {})
def GET(self, id, polarity): if not model.hasUserVoted(auth.getUser().user_id, id): model.vote(polarity, auth.getUser().user_id, id) origPost = model.getOrigional(id) raise web.seeother("/view/" + str(origPost))