File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -94,15 +94,15 @@ def get_queryset(self):
9494 def get_context_data (self , ** kwargs ):
9595 context = super ().get_context_data (** kwargs )
9696
97- # Get today's events sorted by most recent
97+ # today's events, most recent first
9898 today_events = list (Event .objects .until_datetime (timezone .now ()).filter (
9999 calendar__slug = self .kwargs ['calendar_slug' ]))
100100 today_events .sort (key = lambda e : e .previous_time .dt_start if e .previous_time else timezone .now (), reverse = True )
101101 context ['events_today' ] = today_events [:2 ]
102102
103103 context ['calendar' ] = get_object_or_404 (Calendar , slug = self .kwargs ['calendar_slug' ])
104104
105- # Get upcoming events sorted by nearest first
105+ # upcoming events, soonest first
106106 upcoming = list (self .get_queryset ())
107107 upcoming .sort (key = lambda e : e .next_time .dt_start if e .next_time else timezone .now ())
108108 context ['upcoming_events' ] = upcoming
You can’t perform that action at this time.
0 commit comments