{% extends 'base.html' %}

{% block content %}
<div class='each_block'>
<div class='tag'>{{postdetail.tagname}}</div>
<div class='heading'>{{postdetail.title}}</div>
<span class='name'>This article is shared by&nbsp;{{postdetail.author}}</span>
<div class='body'>{{postdetail.body}}
</div>
<hr>
</div>
{% for p in post %}

<div class='each_block'>
<div class='tag'>{{p.tagname}}</div>
<div class='heading'><a href ="{% url 'detail' p.pk %}">{{p.title}}</a></div>
<span class='name'>This article is shared by&nbsp;{{p.author}}</span>
<div class='body'>{{p.body|truncatewords:30}}&nbsp;<a href ="{% url 'detail' p.pk  %}">Continue reading</a>
</div>
<hr>
</div>
{% endfor %}
{% endblock %}




