{% extends "news/base_news.html" %} {% load news %} {% load custom_date %} {% load pagination_tags %} {% block title %}Post archive - {{ block.super }}{% endblock %} {% block body_class %}{{ block.super }} post_list{% endblock %} {% block content %} {% include "django_messages/inlines/navigation.html" %}

{% get_news_years as news_years %}
{% for muh in news_years %} {{ muh.year }} {% endfor %} {% autopaginate object_list 10 %} {% paginate %}

{% for object in object_list %} {% include "news/inlines/post_detail.html" %}
{% endfor %}
{% if page_obj.has_other_pages %}
{% paginate %}
{% endif %}
{% endblock %}