[Django] #31620: WeekArchiveView '%V' support

13 views
Skip to first unread message

Django

unread,
May 23, 2020, 8:56:11 AM5/23/20
to django-...@googlegroups.com
#31620: WeekArchiveView '%V' support
-----------------------------------------+------------------------
Reporter: jjagielka | Owner: nobody
Type: New feature | Status: new
Component: Generic views | Version: 3.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
#26217 (Docs for WeekArchiveView are misleading about %W) - closed 4 years
ago mentioned support for %V week format.

Since python 3.6, %G, %u and %V ISO 8601 formatters were added to
`strptime`.

`WeekArchiveView` should add %V to the list of accepted week formatters.
This would require as well the special case to change the year format to
%G, or simply `ValueError` in `_date_from_string` should mention the
message passed from `datetime.datetime.strptime`:

''ISO week directive '%V' is incompatible with the year directive '%Y'.
Use the ISO year '%G'.''

--
Ticket URL: <https://code.djangoproject.com/ticket/31620>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 25, 2020, 1:17:50 AM5/25/20
to django-...@googlegroups.com
#31620: Support "%V" format in WeekArchiveView.
--------------------------------+------------------------------------
Reporter: Jakub Jagielka | Owner: nobody

Type: New feature | Status: new
Component: Generic views | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------
Changes (by felixxm):

* version: 3.0 => master
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:1>

Django

unread,
May 26, 2020, 1:14:37 PM5/26/20
to django-...@googlegroups.com
#31620: Support "%V" format in WeekArchiveView.
--------------------------------+------------------------------------------
Reporter: Jakub Jagielka | Owner: Omkar Kulkarni
Type: New feature | Status: assigned

Component: Generic views | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Changes (by Omkar Kulkarni):

* owner: nobody => Omkar Kulkarni
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:2>

Django

unread,
Jun 25, 2020, 5:34:55 PM6/25/20
to django-...@googlegroups.com
#31620: Support "%V" format in WeekArchiveView.
--------------------------------+------------------------------------------
Reporter: Jakub Jagielka | Owner: Hasan Ramezani

Type: New feature | Status: assigned
Component: Generic views | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Changes (by Hasan Ramezani):

* owner: Omkar Kulkarni => Hasan Ramezani
* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:3>

Django

unread,
Jun 26, 2020, 1:41:52 AM6/26/20
to django-...@googlegroups.com
#31620: Support "%V" format in WeekArchiveView.
--------------------------------+------------------------------------------
Reporter: Jakub Jagielka | Owner: Hasan Ramezani
Type: New feature | Status: assigned
Component: Generic views | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Changes (by Jakub Jagielka):

* needs_better_patch: 0 => 1


Comment:

Replying to [comment:3 Hasan Ramezani]:

Unfortunately the implementation is wrong. ISO weeks start on Monday.

https://en.wikipedia.org/wiki/ISO_week_date

--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:4>

Django

unread,
Jun 26, 2020, 3:47:29 AM6/26/20
to django-...@googlegroups.com
#31620: Support "%V" format in WeekArchiveView.
--------------------------------+------------------------------------------
Reporter: Jakub Jagielka | Owner: Hasan Ramezani
Type: New feature | Status: assigned
Component: Generic views | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+------------------------------------------
Changes (by Hasan Ramezani):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:5>

Django

unread,
Jun 26, 2020, 5:14:31 AM6/26/20
to django-...@googlegroups.com
#31620: Support "%V" format in WeekArchiveView.
-------------------------------------+-------------------------------------

Reporter: Jakub Jagielka | Owner: Hasan
| Ramezani
Type: New feature | Status: assigned
Component: Generic views | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:6>

Django

unread,
Jun 26, 2020, 5:48:11 AM6/26/20
to django-...@googlegroups.com
#31620: Support "%V" format in WeekArchiveView.
-------------------------------------+-------------------------------------
Reporter: Jakub Jagielka | Owner: Hasan
| Ramezani
Type: New feature | Status: closed

Component: Generic views | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"8984cab8a80af8555b1ccfa5b552d411b47f9bca" 8984cab]:
{{{
#!CommitTicketReference repository=""
revision="8984cab8a80af8555b1ccfa5b552d411b47f9bca"
Fixed #31620 -- Added support for %V format to WeekMixin/WeekArchiveView.

Co-authored-by: Mariusz Felisiak <felisiak...@gmail.com>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:7>

Reply all
Reply to author
Forward
0 new messages