{% load dt_week %} <!DOCTYPE html> <html lang="fr"> <head> <meta charset="utf-8" /> <title>celcatsanitizer</title> </head> <body> <h1>celcatsanitizer</h1> {% for timetable in timetables %} <h3>{{ timetable.name }}</h3> <ul> {% for group in groups %} {% if group.timetable.id == timetable.id %} <li>{{ group.name }} – {% for week in group.weeks %}<a href="{% url "timetable" timetable.slug week.year week|dt_week group.slug %}">{{ week|dt_prettyprint }}</a> {% endfor %}</li> {#<li><a href="{% url "timetable" timetable.slug 2017 52 group.slug %}">{{ group.name }}</a></li>#} {% endif %} {% endfor %} </ul> {% endfor %} </body> </html>