Add blog templatetag call to retrieve last two post and display in homepage

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%4010
This commit is contained in:
Matias Aguirre 2008-06-27 02:40:11 +00:00
parent b5fe965315
commit f91f073363
1 changed files with 9 additions and 18 deletions

View File

@ -37,26 +37,17 @@
<div class="box">
<h3>Scrapy Weblog</h3>
{% load lastblogentry %}
{% get_latest_blog_entries 2 as entries %}
<div class="post">
<h4><a href="#">post title</a></h4>
<p class="author">by <a href="#">Molvo</a> on May 14, 2008</p>
<p class="abstract">
Nullam ullamcorper, sem quis interdum imperdiet, velit leo convallis ante, eget fringilla lacus
interdum imperdiet, velit leo convallis ante, eget fringilla...
</p>
<a href="#" class="more">&raquo; Read More</a>
</div>
<div class="post last">
<h4><a href="#">post title</a></h4>
<p class="author">by <a href="#">Molvo</a> on May 14, 2008</p>
<p class="abstract">
Nullam ullamcorper, sem quis interdum imperdiet, velit leo convallis ante, eget fringilla lacus
interdum imperdiet, velit leo convallis ante, eget fringilla...
</p>
<a href="#" class="more">&raquo; Read More</a>
{% for entry in entries %}
<div class="post{% if forloop.last %} last{% endif %}">
<h4><a href="{{ entry.get_absolute_url }}">{{ entry.headline }}</a></h4>
<p class="author">by {{ entry.author }} on {{ entry.pub_date|date:"M d, Y"}}</p>
<p class="abstract">{{ entry.summary }}</p>
<a href="{{ entry.get_absolute_url }}" class="more">&raquo; Read More</a>
</div>
{% endfor %}
</div>
</div>
</div>