{% extends "blog_base.html" %} {% block content %} {# Overwrite the content block from blog_base.html #} {% for entry in blog %} {# Iterate over the blog entries #}
{{ entry.title|title }}
{# Some more info about the post #}
{{ entry.author }} at {{ entry.date|date:"r" }}
{{ entry.content|truncatewords:100|linebreaks }} {# print only a preview #} Read More
{# Display how many comments are there (0 comments, 1 comment, 2 comments) :#}
{{ entry.comments|length }} comment{{ entry.comments|length|pluralize }}
{% endfor %}

{% ifnotequal page 0 %} {# We are not on the first page #} Previous page {% endifnotequal %} {% ifnotequal page pages %} {# We are not on the last page #} Next page {% endifnotequal %}

{% endblock %} {% block morecss %} {# Add some more stylesheets #} .blog_entry_title { color:#1F20AF; font-weight:bold; font-size:1.5em; margin-top:25px; } .blog_entry_small { font-size:0.8em; color:grey; } .blog_entry_text { padding-left:10px; } .morelink { display:block; text-align:right; font-size:0.7em; } {% endblock %}