Skip to content
Snippets Groups Projects
Verified Commit 90d76062 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Enable sorting of lessons and lesson periods by subjects

Close #54
parent eceac485
No related branches found
No related tags found
1 merge request!45Improve handling of child/parent groups
......@@ -450,7 +450,7 @@ class Lesson(ExtensibleModel):
return CalendarWeek(year=year, week=week)
class Meta:
ordering = ["date_start"]
ordering = ["date_start", "subject"]
indexes = [models.Index(fields=["date_start", "date_end"])]
......@@ -559,7 +559,7 @@ class LessonPeriod(ExtensibleModel):
)
class Meta:
ordering = ["lesson__date_start", "period__weekday", "period__period"]
ordering = ["lesson__date_start", "period__weekday", "period__period", "lesson__subject"]
indexes = [models.Index(fields=["lesson", "period"])]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment