From 4392d193a96dae6a0efb2e22b42a8c55b3e7707f Mon Sep 17 00:00:00 2001 From: Ernesto Rico Schmidt Date: Thu, 23 Jan 2020 23:50:06 -0400 Subject: add year and week to context of week schedule diff --git a/program/views.py b/program/views.py index ae81813..f6fc7c7 100644 --- a/program/views.py +++ b/program/views.py @@ -166,6 +166,8 @@ class WeekScheduleView(TemplateView): context['saturday_timeslots'] = TimeSlot.objects.get_day_timeslots(saturday) context['sunday_timeslots'] = TimeSlot.objects.get_day_timeslots(sunday) context['last_w'] = datetime.strftime(monday - timedelta(days=7), '%G/%V') + context['current_year'] = datetime.strftime(monday, '%G') + context['current_week'] = datetime.strftime(monday, '%V') context['cur_w'] = datetime.strftime(monday, '%G/%V') context['next_w1'] = datetime.strftime(monday + timedelta(days=7), '%G/%V') context['next_w2'] = datetime.strftime(monday + timedelta(days=14), '%G/%V') -- cgit v0.10.2