def get(self): id = int(self.request.args.get('id')) if not id: return Response('no id given') event = Event.get_by_id(id) if not event: return Response('no event found') event.delete() return self.redirect('/admin/events?del=1')
def get(self): ServeBasics.get(self) id = int(self.request.args.get('id')) if not id: return Response('no id') event = Event.get_by_id(id) if not event: return Response('no event found') self.context['event'] = event return self.render_response('event.html', **self.context)