Monday as first day of week for WeekArchiveView
-
07-02-2021 - |
Question
How do I convince WeekArchiveView
that Monday is the first day of week?
La solution
Juding by this diff, it is achieved by adding week_format
parameter to urls.py
:
url(r'^items/(?P<year>\d{4})/week/(?P<week>\d{1,2})/$', ItemArchiveView.as_view(
week_format='%W'
)),
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow