This PR adds the Browse Books page, which shows popular, recently added, and recently updated books. It adds two new database fields, added and updated, which store the date and time that a book was added to the database or updated. A custom save method in the Book model is used to update the updated timestamp only when certain fields are modified.
The popular books are determined by the number of downloads. A download is defined as when a user clicks on the "Downloads" button for a book. This is tracked by having the Downloads button link to a local URL path on the site, which redirects to the Github releases page for the book after incrementing its num_downloads value.
This PR adds the Browse Books page, which shows popular, recently added, and recently updated books. It adds two new database fields,
added
andupdated
, which store the date and time that a book was added to the database or updated. A customsave
method in the Book model is used to update theupdated
timestamp only when certain fields are modified.The popular books are determined by the number of downloads. A download is defined as when a user clicks on the "Downloads" button for a book. This is tracked by having the Downloads button link to a local URL path on the site, which redirects to the Github releases page for the book after incrementing its
num_downloads
value.