Adding functionality to handle attention requests
We need to deal with two aspects of attention requests. The first, as discussed earlier, is to create new requests when a user visits a URL. The second is to allow the waiters of the restaurant to view these requests and mark them as resolved.
Writing the attention request code
When a user visits a URL, we should create an attention request and store it in the database. This attention request should contain:
- The time the request was made
- The table from which the request was made
As before, we'll just use a Python dictionary to represent the attention request object. We need to have our application code create new attention requests and allow these requests to be added, retrieved, and deleted from the ...
Get Flask By Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.