def post(self, topic_id): slot_id = int(self.request.get("slot_id")) local_time = self.request.get("local_time") action = self.request.get("action") topic_slot = TopicSlot.get_by_id(slot_id) rsvp = TopicRSVP.get_for_user_and_slot(users.get_current_user(), topic_slot) if not rsvp and action == "signup": rsvp = TopicRSVP(slot=topic_slot, attendee=users.get_current_user(), local_time=local_time) rsvp.put() self.redirect(topic_slot.full_link) if rsvp and action == "unsignup": rsvp.delete() self.render_signup(topic_id)