mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #31620 -- Added support for %V format to WeekMixin/WeekArchiveView.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
committed by
Mariusz Felisiak
parent
d2c135da4c
commit
8984cab8a8
@@ -342,6 +342,12 @@ views for displaying drilldown pages for date-based data.
|
||||
* ``'%W'``: Similar to ``'%U'``, except it assumes that the week
|
||||
begins on Monday. This is not the same as the ISO 8601 week number.
|
||||
|
||||
* ``'%V'``: ISO 8601 week number where the week begins on Monday.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
Support for the ``'%V'`` week format was added.
|
||||
|
||||
**Example myapp/views.py**::
|
||||
|
||||
from django.views.generic.dates import WeekArchiveView
|
||||
|
||||
@@ -180,7 +180,12 @@ Date-based mixins
|
||||
|
||||
The :func:`~time.strftime` format to use when parsing the week. By
|
||||
default, this is ``'%U'``, which means the week starts on Sunday. Set
|
||||
it to ``'%W'`` if your week starts on Monday.
|
||||
it to ``'%W'`` or ``'%V'`` (ISO 8601 week) if your week starts on
|
||||
Monday.
|
||||
|
||||
.. versionadded:: 3.2
|
||||
|
||||
Support for the ``'%V'`` week format was added.
|
||||
|
||||
.. attribute:: week
|
||||
|
||||
|
||||
Reference in New Issue
Block a user