diff options
| author | Hasan Ramezani <hasan.r67@gmail.com> | 2020-06-25 23:00:51 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-06-26 11:12:57 +0200 |
| commit | 8984cab8a80af8555b1ccfa5b552d411b47f9bca (patch) | |
| tree | 0951ce3e3396d696a2a28595d4019e1becd0abc9 /docs | |
| parent | d2c135da4c75079e45661ec609bd72f27dddf2a9 (diff) | |
Fixed #31620 -- Added support for %V format to WeekMixin/WeekArchiveView.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/class-based-views/generic-date-based.txt | 6 | ||||
| -rw-r--r-- | docs/ref/class-based-views/mixins-date-based.txt | 7 | ||||
| -rw-r--r-- | docs/releases/3.2.txt | 5 |
3 files changed, 16 insertions, 2 deletions
diff --git a/docs/ref/class-based-views/generic-date-based.txt b/docs/ref/class-based-views/generic-date-based.txt index a42896c058..dcfb16e54b 100644 --- a/docs/ref/class-based-views/generic-date-based.txt +++ b/docs/ref/class-based-views/generic-date-based.txt @@ -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 diff --git a/docs/ref/class-based-views/mixins-date-based.txt b/docs/ref/class-based-views/mixins-date-based.txt index 471e222a6e..95e1868d1b 100644 --- a/docs/ref/class-based-views/mixins-date-based.txt +++ b/docs/ref/class-based-views/mixins-date-based.txt @@ -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 diff --git a/docs/releases/3.2.txt b/docs/releases/3.2.txt index 743d341a7f..9f1d785934 100644 --- a/docs/releases/3.2.txt +++ b/docs/releases/3.2.txt @@ -166,7 +166,10 @@ Forms Generic Views ~~~~~~~~~~~~~ -* ... +* The ``week_format`` attributes of + :class:`~django.views.generic.dates.WeekMixin` and + :class:`~django.views.generic.dates.WeekArchiveView` now support the + ``'%V'`` ISO 8601 week format. Internationalization ~~~~~~~~~~~~~~~~~~~~ |
