NB: this PR builds on #8, #9 and #10, hence the lengthy list of commits. This PR won't function without those merged. The main changes are in the 3 most recent commits
This PR adds a delete Trashcan icon to the user's Acquisitions table. When pressed, it deletes the associated uploaded files and removes the corresponding entry from the Acquisition table. Looks like this:
This PR was partly a self-training exercise, to get my head around linking between the HTML, Flask code and databases.
We do need this functionality, but it also needs some Exceptions code, for instance, to check the existence of the uploaded files, whether there is an entry in the Acquisitions table, etc. And, it also needs some feedback to the user – at the moment it's an instant delete; there is no yes/no confirmation on the user's part.
NB: this PR builds on #8, #9 and #10, hence the lengthy list of commits. This PR won't function without those merged. The main changes are in the 3 most recent commits
This PR adds a delete Trashcan icon to the user's Acquisitions table. When pressed, it deletes the associated uploaded files and removes the corresponding entry from the Acquisition table. Looks like this:
This PR was partly a self-training exercise, to get my head around linking between the HTML, Flask code and databases.
We do need this functionality, but it also needs some Exceptions code, for instance, to check the existence of the uploaded files, whether there is an entry in the Acquisitions table, etc. And, it also needs some feedback to the user – at the moment it's an instant delete; there is no yes/no confirmation on the user's part.