4.5.1 Coding the Foundation of the Template in HTML

Let’s write the HTML for the body of the webpage that will display a tag. Create a new file /organizer/templates/organizer/tag_detail.html, and write the code shown in Example 4.7.

Example 4.7: Project Code

organizer/templates/organizer/tag_detail.html in db859e6f4b

 1  <h2> </h2>  2    <section>  3      <h3>Startups</h3>  4      <ul>  5  6      </ul>  7    </section>  8        <section>  9          <h3>Blog Posts</h3> 10          <ul> 11 12          </ul> 13        </section>

Info

The indentation in my project templates are a little strange, because they reflect the indentation levels of the HTML elements as they appear at the end of the project. ...

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.