summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorErnesto Rico Schmidt <e.rico.schmidt@gmail.com>2020-01-24 03:50:06 (GMT)
committerChristian Pointner <equinox@helsinki.at>2020-01-24 20:34:33 (GMT)
commit254b72cd28d07149715f921a5286efe1e800192a (patch)
tree89f72e188fa897d71d8027cbdfe0793495043d35 /program
parentfebbb540692db9f95eecf69d42ed22e8c1d1fc16 (diff)
add year and week to context of week schedule
Diffstat (limited to 'program')
-rw-r--r--program/views.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/program/views.py b/program/views.py
index 3b86b5d..365a4db 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')