November 2015
Beginner to intermediate
840 pages
26h 30m
English
Create a new file /blog/templates/blog/post_detail.html, as shown in Example 4.43. We plan to pass data to a post variable.
Example 4.43: Project Code
blog/templates/blog/post_detail.html in b04022d368
1 <article> 2 3 <header> 4 <h2> {{ post.title|title }}</h2> 5 <p> 6 Written on 7 <time datetime="{{ post.pub_date|date:"Y-m-d" }}"> 8 {{ post.pub_date|date:"l, F j, Y" }} 9 </time> 10 </p> 11 </header> 12 13 {{ post.text|linebreaks }} 14 15 {% if post.startups.all or post.tags.all %} 16 <footer> 17 18 {% if post.startups.all %} 19 <section> 20
Read now
Unlock full access