def approve_single_delete(request): application_id = request.POST.get("id", "") application = delete_vm(application_id) if application: application.reviewer = request.user application.save() return HttpResponse("1") else: return HttpResponse("0")
def approve_all_delete(request): application_list = json.loads(request.body.decode()) for application_id in application_list: delete_vm(application_id) return HttpResponse("1")