Skip to content
Snippets Groups Projects
Commit 5c952664 authored by Christian Pointner's avatar Christian Pointner
Browse files

added week number calculations

parent 2e241df2
No related branches found
No related tags found
1 merge request!1Multi week
......@@ -110,4 +110,11 @@ def week_schedule(request, year=None, week=None):
extra_context['saturday_timeslots'] = TimeSlot.objects.get_day_timeslots(saturday)
extra_context['sunday_timeslots'] = TimeSlot.objects.get_day_timeslots(sunday)
extra_context['last_w'] = datetime.strftime(monday-timedelta(days=7), '%Y/%W')
extra_context['cur_w'] = '%s/%s' % (year, week)
extra_context['next_w1'] = datetime.strftime(monday+timedelta(days=7), '%Y/%W')
extra_context['next_w2'] = datetime.strftime(monday+timedelta(days=14), '%Y/%W')
extra_context['next_w3'] = datetime.strftime(monday+timedelta(days=21), '%Y/%W')
extra_context['next_w4'] = datetime.strftime(monday+timedelta(days=28), '%Y/%W')
return simple.direct_to_template(request, template='program/week_schedule.html', extra_context=extra_context)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment