At the moment the front of the movie card says None in large letters.


Instead, we want it to display the ranking of the movie according to our rating. e.g.

If we gave The Matrix a rating of 9.2 and Spirited Away was rated 9.5 and those are the only 2 movies we've added then it should display:



If we add another movie and it had the highest rating among the movies, then it should be ranked according to it's rating.

e.g. If Matrix (9.3), Spirited Away (9.5), Parasite (9.9)


But if we edit the rating so that it becomes: Matrix (9.3), Spirited Away (9.5), Parasite (8.9)

Then this is what should happen:



HINT 1: https://docs.sqlalchemy.org/en/13/orm/query.html#sqlalchemy.orm.query.Query.order_by

HINT 2: You don't need to change any code in index.html

HINT 3: You only need to change the code in the home() function.


SOLUTION


COMPLETED PROJECT