1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
{% extends "base.html" %} {% block content %} <div class="blogItem"> {% if articles %} {% for article in articles %} {% if loop.index == 1 %} <ul> {% for category, articles in categories %} <li>{{ category }}</li> {% endfor %} </ul> {% endif %} {% endfor %} {% endif %} </div> {% endblock %}