I have a subclass of WeekArchiveClass:
class CallWeekArchiveView(WeekArchiveView):
queryset = Call.objects.all()
date_field = "dispatched"
make_object_list = True
allow_future = True
allow_empty = True
When I look at /call/archive/2015/week/24/ I get dates in the range of 6/14 to 6/20 but according to http://www.epochconverter.com/date-and-time/weeknumbers-by-year.php the dates should range from Mon 6/8 to Sun 6/14.
The main thing I want to do is have the default of the current week for which I am attempting:
utc = pytz.timezone('UTC')
today = datetime.now(utc)
...
call_archive = '/call/archive/%d/week/%d' % ( today.year, today.isocalendar()[1] )
which gives call_archive
as /call/archive/2015/week/25
which for today appears to be correct.
The problem comes up when I go to that url the page is empty as the date range appears to be wrong based on the example view of week/24.
So, why, when I go to /call/archive/2015/week/24
does the dates come up as 6/14 to 6/20?
And for reference I am at Django 1.8 and Python 3.4 but I suspect that is not part of the issue.