Skip to content

Commit

Permalink
Ch04: Create Post list template.
Browse files Browse the repository at this point in the history
  • Loading branch information
jambonrose committed Jul 30, 2015
1 parent b04022d commit 597bfb9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions blog/templates/blog/post_list.html
@@ -0,0 +1,23 @@
{% for post in post_list %}
<article>
<header>
<h2>
<a href="">
{{ post.title|title }}</a>
</h2>
<p>
Written on:
<time datetime="{{ post.pub_date|date:"Y-m-d" }}">
{{ post.pub_date|date:"l, F j, Y" }}
</time>
</p>
</header>
<p>{{ post.text|truncatewords:20 }}</p>
<p>
<a href="">
Read more&hellip;</a>
</p>
</article>
{% empty %}
<p><em>No Blog Posts Available</em></p>
{% endfor %}

0 comments on commit 597bfb9

Please sign in to comment.