def delete(self, id): event = EventModel.get(id) if event: event.delete() referrer = self.request.headers['referer'] self.redirect(referrer) else: self.error(503)
def update(self, id): event = EventModel.get(id) if event: event.name = self.request.get("name") event.date = self.request.get("date") event.location = self.request.get("location") event.priority = int(self.request.get("priority")) event.put() referrer = self.request.headers['referer'] self.redirect(referrer) else: self.error(503)