order export by week first
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user