How to use the robotframework.models.Email.objects.filter 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 delete_recevier_message(request):
    username = request.session.get('user', '')
    emails = Email.objects.all()
    if request.method =="POST":
        email_id = request.POST.get("id")
        Email.objects.filter(email_id=email_id).delete()
    return render(request, "email_add_page.html", {"user": username, "emails": emails})
github Wesly-Yu / AutoZone / robotframework / webviews.py View on Github external
def edit_recevier_message(request):
    username = request.session.get('user', '')
    emails = Email.objects.all()
    if request.method =="POST":
        id = request.POST.get("id")
        edit_sender_email_site = request.POST.get("edit_sender_email_site")
        edit_recevier_email_sites = request.POST.get("edit_recevier_email_sites")
        edit_email_subject = request.POST.get("edit_email_subject")
        edit_recevier_email_port = request.POST.get("edit_recevier_email_port")
        edit_email_body = request.POST.get("edit_email_body")
        Email.objects.filter(email_id=id).update(sender=edit_sender_email_site, receivers=edit_recevier_email_sites, body=edit_email_body,
                             email_port=edit_recevier_email_port, subject=edit_email_subject)
    return  render(request,"email_add_page.html",{"user": username,"emails": emails})