Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def add_web_casename(request):
username = request.session.get('user', '')
webcases = Webcase.objects.all()
if request.method == "POST":
webmodelname = request.POST.get("webmodelname", )
webcasename = request.POST.get("webcasename", )
webcharger = request.POST.get("webcharger", )
webaddcasedesc = request.POST.get("webaddcasedesc", )
Webcase.objects.get_or_create(webcase_models=webmodelname,webcasename=webcasename,webcase_charger=webcharger,webcasedesc=webaddcasedesc)
return render(request, "Web_test_robotframework.html", {"user": username, "webcases":webcases})