MCS 275 Spring 2022
in preparation for using it in upcoming assignments.
python3 -m pip install Flask
Build the worker view template
Create the database and link it to the Flask application
orders has columns:
woid- integer uniquely identifying a WO
assigned_to- username this WO is assigned to (NULL if not assigned)
/worker/ddumas/ results in:
Note part of the URL is an argument. The pattern is
Buttons on the worker view form need to perform actions.
We'll make Flask routes for this, e.g.
Requesting that URL should perform an action. But what content will it serve?
Every HTTP request results in a numerical status.
So far, we've seen 404 (NOT FOUND) and 200 (OK, generated by Flask when we return HTML).
There are also codes that instruct the browser to load another resource, e.g. 302 (FOUND).
flask.redirect("destination") to make this happen.