diff --git a/templates/results.html b/templates/results.html
new file mode 100644
index 0000000..e465a51
--- /dev/null
+++ b/templates/results.html
@@ -0,0 +1,20 @@
+{# templates/results.html #}
+
+
+
+
+
+ Results
+
+
+
+ {{ test_name }} ResultadOS:
+
+ {% for student in students %}
+ -
+ {{ student.name }}: {{ student.score }}/{{ max_score }}
+
+ {% endfor %}
+
+
+
diff --git a/write_messages.py b/write_messages.py
index 02f65d9..5f789ef 100644
--- a/write_messages.py
+++ b/write_messages.py
@@ -15,13 +15,14 @@ students = [
environment = Environment(loader=FileSystemLoader("templates/"))
template = environment.get_template("message.txt")
-for student in students:
- filename = f"message_{student['name'].lower()}.txt"
- content = template.render(
- student,
- max_score=max_score,
- test_name=test_name
- )
- with open(filename, mode="w", encoding="utf-8") as message:
- message.write(content)
- print(f"... wrote {filename}")
+
+results_filename = "students_results.html"
+results_template = environment.get_template("results.html")
+context = {
+ "students": students,
+ "test_name": test_name,
+ "max_score": max_score,
+}
+with open(results_filename, mode="w", encoding="utf-8") as results:
+ results.write(results_template.render(context))
+ print(f"... wrote {results_filename}")