order export by week first

This commit is contained in:
2025-11-27 13:07:08 +01:00
parent 1c0b287666
commit 33c610dcbc

View File

@@ -79,7 +79,7 @@ def export_selected(request: HttpRequest, queryset: QuerySet[WeekPreference]) ->
# Each of this iterations fills the table for a student # Each of this iterations fills the table for a student
row: int = 2 row: int = 2
row_offset: int = 0 row_offset: int = 0
for i, q in enumerate(queryset.order_by("student__surname", "student__name", "student__course"), start=1): for i, q in enumerate(queryset.order_by("week", "student__surname", "student__name", "student__course"), start=1):
student_data: List[str] student_data: List[str]
student_phone: str = q.student.phone if q.student.phone else "" student_phone: str = q.student.phone if q.student.phone else ""
student_email: str = q.student.email student_email: str = q.student.email