content/lab_assets/start/lab4/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py [44:70]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    for param in event["queryStringParameters"]:
        value = event["queryStringParameters"][param]
        if not value:
            value = "-"
        item_data[param] = value
    table.put_item(
        Item=item_data
    )
    doc, tag, text = Doc().tagtext()
    with tag('html'):
        with tag('body'):
            with tag('div', align='center'):
                with tag('h1'):
                    count = 0
                    while count < 6:
                        count += 1
                        doc.stag('br')
                    text("Your answer was submitted!")
    html_result = doc.getvalue()
    return {
            'statusCode': "200",
            'body': html_result,
            'headers': {
                'Content-Type': 'text/html',
                "Refresh": "5;url=newsurvey",
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



content/lab_assets/start/lab5/cfn-project/lambda_functions/source/SurveySubmit/survey_submit.py [46:72]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    for param in event["queryStringParameters"]:
        value = event["queryStringParameters"][param]
        if not value:
            value = "-"
        item_data[param] = value
    table.put_item(
        Item=item_data
    )
    doc, tag, text = Doc().tagtext()
    with tag('html'):
        with tag('body'):
            with tag('div', align='center'):
                with tag('h1'):
                    count = 0
                    while count < 6:
                        count += 1
                        doc.stag('br')
                    text("Your answer was submitted!")
    html_result = doc.getvalue()
    return {
            'statusCode': "200",
            'body': html_result,
            'headers': {
                'Content-Type': 'text/html',
                "Refresh": "5;url=newsurvey",
            }
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



