As mentioned in the configuration, all view templates are located in the /path/to/repo/www/chapter_07/templates directory. We modify the booking.html template, iterating through the results of fetchTop10(). Note that we are not showing the entire template here. In the template, we define a for loop that displays only the property name, and 10 words from the description:
<h3>Top Ten</h3>
<ul>
{% for property in top_10 %}
<li>
<b>{{ property.propName }}</b>
<br>{{ property.propInfo.description|truncatewords:"10" }}
</li>
{% endfor %}
</ul>
Here are the results provided by the browser when using the http://booksomeplace.local/booking/Â URL:
As you can see, the name and abbreviated description of the most popular properties are listed.