Intro-to-Jinja-tpl-v2/templates/results.html

17 lines
382 B
HTML
Raw Permalink Normal View History

2024-02-12 16:39:27 +00:00
{# templates/results.html #}
{% extends "base.html" %}
2024-02-12 16:39:27 +00:00
{% block content %}
<h1>{{ test_name }} {{ title }}: </h1>
2024-02-12 16:39:27 +00:00
<ul>
2024-02-13 16:45:22 +00:00
{% for student in students|sort(attribute="name") %}
2024-02-13 11:24:27 +00:00
<li>
{% if student.score > 80 %} :-) {% else %} :-( {% endif %}
2024-02-12 16:39:27 +00:00
<em>{{ student.name }}:</em> {{ student.score }}/{{ max_score }}
</li>
{% endfor %}
</ul>
{% endblock content %}