Closed theluiscarbonell closed 1 year ago
If a user were to click on the checkbox twice, then click the "update" button, it would change the status of the task despite there not being an actual change.
https://github.com/patrickloeber/python-fun/blob/dc8aa51d9282a7baed8240ebc7db1b4bcafc7f7c/webapps/flask/app.py#L43
When a user clicks the "update" button, w.e. the status of the checkbox is should be what the todo.complete value is set to.
todo.complete
This might require changing the handler from a GET to a PUT request so that data can be passed in; or, using a <form> in the HTML.
GET
PUT
<form>
Current Behavior
If a user were to click on the checkbox twice, then click the "update" button, it would change the status of the task despite there not being an actual change.
https://github.com/patrickloeber/python-fun/blob/dc8aa51d9282a7baed8240ebc7db1b4bcafc7f7c/webapps/flask/app.py#L43
Expected Behavior
When a user clicks the "update" button, w.e. the status of the checkbox is should be what the
todo.complete
value is set to.Notes, Thoughts, Comments
This might require changing the handler from a
GET
to aPUT
request so that data can be passed in; or, using a<form>
in the HTML.