November 2015
Beginner to intermediate
840 pages
26h 30m
English
We can now create a template to list our startups. As shown in Example 4.42, create a new file /organizer/templates/organizer/startup_list.html.
Example 4.42: Project Code
organizer/templates/organizer/startup_list.html in 13ce1870d0
1 <h2>Startup List</h2> 2 <ul> 3 {% for startup in startup_list %} 4 <li> 5 <a href=""> 6 {{ startup.name }}</a> 7 </li> 8 {% empty %} 9 <li><em>No Startups Available</em></li> 10 {% endfor %} 11 </ul>
In Chapter 5, we pass a list of startups to the startup_list template variable. The template iterates through the list using the for template tag loop, making ...
Read now
Unlock full access