Hopefully, you've played around with the code in the previous lesson and you're now able to perform CRUD operations as well as create tables and databases with SQLAlchemy.

Because now comes the final challenge.

You're going to build an SQLite database into the Flask Website we built at the beginning of today. So that any books added are stored in the database and you're also going to build in some extra features to take advantage of the full CRUD features of our database.


Website Requirements

SOLUTION


SOLUTION


HINT: You'll need to think about how to pass the book id as a parameter when you make the GET request to show the edit rating page. There are many ways you can do this. Here are some things that might help:

https://flask.palletsprojects.com/en/2.3.x/quickstart/#url-building

https://stackoverflow.com/questions/24892035/how-can-i-get-the-named-parameters-from-a-url-using-flask


SOLUTION


SOLUTION


You can also download the COMPLETED PROJECT from this lesson's resources.