How to use the robotframework.models.Webcase_keywords.objects.all function in robotframework

To help you get started, we’ve selected a few robotframework examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Wesly-Yu / AutoZone / robotframework / webviews.py View on Github external
def change_keywords(request):
    username = request.session.get('user', '')
    keywords = Webcase_keywords.objects.all()
    if request.method == "POST":
        id = request.POST.get("id", )
        library = request.POST.get("editlibrary", )
        keyword = request.POST.get("editkeyword", )
        parames = request.POST.get("editparames", )
        comment = request.POST.get("editcomment", )
        Webcase_keywords.objects.filter(keyword_id=id).update(library=library,keyword=keyword,parameter=parames,comment=comment)
    return render(request, "keywordslibrary.html", {"user": username, "keywords": keywords})
github Wesly-Yu / AutoZone / robotframework / webviews.py View on Github external
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})
github Wesly-Yu / AutoZone / robotframework / webviews.py View on Github external
def del_keywords(request):
    username = request.session.get('user', '')
    keywords = Webcase_keywords.objects.all()
    if request.method == "POST":
        try:
            id= request.POST.get("id")
            print(id)
            Webcase_keywords.objects.filter(keyword_id=id).delete()
        except Exception as e:
            print("error")
    return render(request, "keywordslibrary.html", {"user": username, "keywords": keywords})
#修改关键字参数