Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE HELP Creating a flask application to generate a QR code based on form input. All you need is to type the code into main.py

PLEASE HELP Creating a flask application to generate a QR code based on form input. All you need is to type the code into main.py that is in the photos

 

Command Reference - No Particular Order

docker build -t kaw393939/python312 . <- builds image called "kaw393939/python312"

docker run -it kaw393939/python312 <- Runs python type exit() to get out

docker run -it kaw393939/python312 <- Runs the default main.py CMD in the dockerfile

docker run -it kaw393939/python312 app.py <-overrides cmd/command in dockerfile to run app.py instead

docker compose up --build < runs the service defined through the docker-compose.yml file that tells it to build the Dockerfile

docker compose up <- Runs the program but doesn't build a new image

docker run --volume /Users/keithwilliams/Desktop/fall2022/qrprog/qr_generator_service/images:/home/myuser/images Note:

You need to build each time you change your dockerfile

docker exec -it bash allows you to login to the running container

docker tag local-image:tagname new-repo:tagname

docker push new-repo:tagname

docker login <- login to dockerhub if it says access denied when you try to push curl -X POST https://reqbin.com/echo/post/form -H "Content-Type: application/x-www-form-urlencoded" -d "param1=value1¶m2=value2"

 

PART 1

 

 

PART 2

 

 

import os.path from qrcodegenerator import create_qr_code_image from config import Config from flask import Flask, send_file, request app = Flask (__name__) @app.route("/", methods=['GET']) def index_get(): # qr_code_url = url_for('static', filename=Config.QR_CODE_DEFAULT_FILE_NAME) form = ' Make a QR Code \ QR URL: \ \ \ ' return form

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Algorithms questions

Question

Solve the inequality. Write the solution in interval notation. 6 IV

Answered: 1 week ago

Question

preparing for and completing job interviews and considering offers.

Answered: 1 week ago