summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2013-09-20 15:05:01 (GMT)
committerErnesto Rico-Schmidt <e.rico.schmidt@gmail.com>2013-09-20 15:05:01 (GMT)
commit6ba9e32c9b4397e24ac77fbcaf28802b6e7ff5f7 (patch)
treee8ad9c4f25a91b91c8908dc36b1fd54a37afa76a /program
parente89b4c50f48d5acd1b81c3825515b1a34a1d2089 (diff)
fix week number bug.
Diffstat (limited to 'program')
-rw-r--r--program/views.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/program/views.py b/program/views.py
index d824df8..f9ffcab 100644
--- a/program/views.py
+++ b/program/views.py
@@ -114,12 +114,12 @@ 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['last_w'] = datetime.strftime(monday-timedelta(days=7), '%Y/%V')
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')
+ extra_context['next_w1'] = datetime.strftime(monday+timedelta(days=7), '%Y/%V')
+ extra_context['next_w2'] = datetime.strftime(monday+timedelta(days=14), '%Y/%V')
+ extra_context['next_w3'] = datetime.strftime(monday+timedelta(days=21), '%Y/%V')
+ extra_context['next_w4'] = datetime.strftime(monday+timedelta(days=28), '%Y/%V')
return simple.direct_to_template(request, template='program/week_schedule.html', extra_context=extra_context)