summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorJohannes Raggam <raggam-nl@adm.at>2011-12-02 09:56:42 (GMT)
committerJohannes Raggam <raggam-nl@adm.at>2011-12-02 09:56:42 (GMT)
commit663fa4f8bb23070ca242621f22989cbac3925a85 (patch)
tree862496b41b7dd50bb0b72ce0d2c425a6c1499520 /program
parent2e241df25d54370b5288c42e99907e1239c5098c (diff)
parent161d7a1631d250db6bc52e38ec3c31d2b15f128a (diff)
Merge pull request #1 from nnrcschmdt/mutli_week
Multi week
Diffstat (limited to 'program')
-rw-r--r--program/views.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/program/views.py b/program/views.py
index 2f5c137..4bad7f8 100644
--- a/program/views.py
+++ b/program/views.py
@@ -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)