Project Challenge: Retrieving Pets from the Home and Details Page

In this lesson, we will be modifying the home page and pet_details view to retrieve pets from the database.

We'll cover the following

Problem statement

Before now, we have been using the pets list to populate the home page and the Pet Details page. However, in the previous challenge, we inserted some pets into the database. Therefore, now we can use these pets to populate our application!

You will complete the following tasks in this challenge:

  1. Modify the homepage view to retrieve all pets from the database and display them on the home page.

  2. You can make the necessary changes in the home.html template (if needed).

  3. Modify the pet_details view to retrieve the desired pet from the database and display it on the Pet Details page.

  4. You can make any required changes in the details.html template (if needed).

Get hands-on with 1400+ tech skills courses.