myblog/myapp/templates/zinnia/tags/entries_archives_tree.html
{% load i18n %}
{% regroup archives by year as year_list %}
<ul class="no-bullet">
{% for year in year_list %}
<li>
<a title="{% trans "Archives" %} {{ year.grouper }}" rel="archives"
href="{% url 'zinnia:entry_archive_year' year.grouper %}">{{ year.grouper }}</a>
{% regroup year.list by month as month_list %}
<ul>
{% for month in month_list %}
<li>
{% with month_date=month.list.0 %}
<a title="{% trans "Archives" %} {{ month_date|date:"YEAR_MONTH_FORMAT" }}" rel="archives"
href="{% url 'zinnia:entry_archive_month' month_date|date:"Y" month_date|date:"m" %}">
{{ month_date|date:"F" }}
</a>
{% endwith %}
{% regroup month.list by day as day_list %}
<ul>
{% for day in day_list %}
<li>
{% with day_date=day.list.0 %}
<a title="{% trans "Archives" %} {{ day_date|date:"DATE_FORMAT" }}" rel="archives"
href="{% url 'zinnia:entry_archive_day' day_date|date:"Y" day_date|date:"m" day_date|date:"d" %}">
{{ day_date|date:"MONTH_DAY_FORMAT" }}
</a>
{% endwith %}
</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</li>
{% empty %}
<li>
{% trans "No archives yet." %}
</li>
{% endfor %}
</ul>