summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnesto Rico Schmidt <e.rico.schmidt@gmail.com>2020-01-24 03:50:06 (GMT)
committerErnesto Rico Schmidt <e.rico.schmidt@gmail.com>2020-01-24 03:50:06 (GMT)
commit4392d193a96dae6a0efb2e22b42a8c55b3e7707f (patch)
treed39b03af5ef91777ffdde6b9dd5227e19c2175c7
parent9fbe14f600100e6f80271f07a4db73bea6bb5c15 (diff)
add year and week to context of week schedule
-rw-r--r--program/views.py2
1 files changed, 2 insertions, 0 deletions
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')