Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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})
def add_keywords(request):
username = request.session.get('user', '')
keywords = Webcase_keywords.objects.all()
if request.method == "POST":
library = request.POST.get("library", )
keyword = request.POST.get("keyword", )
parames = request.POST.get("parames", )
comment = request.POST.get("comment", )
Webcase_keywords.objects.get_or_create(library=library, keyword=keyword,parameter=parames,comment=comment)
return render(request,"keywordslibrary.html",{"user": username, "keywords": keywords})