O'Reilly logo

Django Unleashed by Andrew Pinkham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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).

Example 4.35: Project Code

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required