def delete(req): if req.method != 'POST': return HttpResponseNotFound() if not is_login(req): return HttpResponseNotAllowed() id = req.POST.get('id') service=TechService() service.delete(id) return HttpResponse(json.dumps({'code': 200}))