Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def delete_web_casesteps(request):
webcaseid = request.POST.get("casename_id")
username = request.session.get('user', '')
webcase = Webcase.objects.get(id=webcaseid)
webcasesteps = Webcasestep.objects.all()
stepid = request.POST.get("step_id")
Webcasestep.objects.filter(Webcase_id=webcaseid,id=stepid).delete()
return render(request, "webcasestep_manage.html",{"user": username, "webcasesteps": webcasesteps, "webcase": webcase})
def display_web_casesteps(request):
username = request.session.get('user', '')
webcaseid = request.GET.get('webcase.id',None)
webcase = Webcase.objects.get(id=webcaseid)
keywords = Webcase_keywords.objects.all()
webcasesteps = Webcasestep.objects.all()
return render(request,"webcasestep_manage.html",{"user": username,"webcasesteps":webcasesteps,"webcase":webcase,"keywords":keywords})