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