Book Page - divyalakshmi1011/Books_Reads GitHub Wiki

Design

Whenever the user clicks on the particular search result, he/she will be directed to the web page where the details of the book will be displayed along with reviews if any.

Implementation

When the user clicks on the particular book result from the search results, then it redirects to /bookpage @app.route where the details method gets executed. In this method:

  • Firstly, get the isbn number from the book result.
  • Query the books table from the database for the isbn related details.
  • Display the details of the isbn on the web page by rendering to bookpage.html.
  • If there are any reviews related to that isbn in the review table in the database then those details also get displayed on the bookpage.

Test Cases

Check whether the given ISBN number is valid or not.If it is valid then the book details are displayed otherwise throws the error message "Book is NOT AVAILABLE".