{% extends "base.html" %} {% block title %}Main Page{% endblock %} {% block content %} {% autoescape off %}

Articles

{% ifequal articles.object_list.count 0 %}
There's no articles yet
{% endifequal %} {% for a in articles.object_list %}
{{ a.date|date:"d.m.Y" }}   {{ a.user }}
{{ a.title }} {% ifequal a.user user %} {% if user.is_active %}   (edit)   (delete) {% endif %} {% endifequal %}
{{ a.text|truncatewords_html:100 }}
Read
{% endfor %} {% if articles.paginator.num_pages > 1 %}
{% if articles.has_previous %} First {% endif %} {% for cur_page in page_list %} {% ifequal articles.number cur_page.name %} {{ cur_page.name }} {% else %} {{ cur_page.name }} {% endifequal %} {% endfor %} {% if articles.has_next %} Last {% endif %}
{% endif %} {% endautoescape %} {% endblock %}