def post(self, slot_id): topic_slot = TopicSlot.get_by_id(int(slot_id)) counter = self.request.get("counter") if counter: topic_slot.counter = int(counter) topic_slot.save() self.render_slot_page(topic_slot)
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)
def get(self, slot_id): topic_slot = TopicSlot.get_by_id(int(slot_id)) self.render_slot_page(topic_slot)