4.6.2 Template for a Single Startup
Object
Create a new file at /organizer/templates/organizer/startup_detail.html
. In the template, we list information associated with a single Startup
object using an HTML definition list, as shown in Example 4.35. We assume that our template is given a startup
object, from which we will derive all data: we will list all of the fields, or data attributes, of our Startup
model class passed to the startup
variable (which we shall code in Chapter 5).
organizer/templates/organizer/startup_detail.html
in 5cc3cf5880
1 <article> 2 3 <h2> {{ startup.name }}</h2> 4 <dl> 5 <dt>Date Founded</dt> 6 <dd> {{ startup.founded_date
Get Django Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.