Exemple #1
0
 def delete(self, id):
     event = EventModel.get(id)
     if event:
         event.delete()
         referrer = self.request.headers['referer']
         self.redirect(referrer)
     else:
         self.error(503)
Exemple #2
0
 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)