[Django] #29903: Invalid week format in Generic date views WeekArchiveView

25 views
Skip to first unread message

Django

unread,
Oct 29, 2018, 10:54:14 AM10/29/18
to django-...@googlegroups.com
#29903: Invalid week format in Generic date views WeekArchiveView
------------------------------------------------+--------------------------
Reporter: Hasan Ramezani | Owner: nobody
Type: Cleanup/optimization | Status: assigned
Component: Generic views | Version: 2.1
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 |
------------------------------------------------+--------------------------
when we use `WeekArchiveView`, we can determine the `week_format` in URL
like this:

{{{
path('<int:year>/week/<int:week>/',
ArticleWeekArchiveView.as_view(week_format='%W'), name="archive_week"),
}}}

The valid formats are: `'%U'` and `%W`. if we pass something else than
those two formats we will get a `KeyError`.


I am gonna to fix this.

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

Django

unread,
Oct 29, 2018, 10:59:32 AM10/29/18
to django-...@googlegroups.com
#29903: Invalid week format in Generic date views WeekArchiveView
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani

Cleanup/optimization | Status: assigned
Component: Generic views | Version: 2.1
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Hasan Ramezani):

* owner: nobody => Hasan Ramezani


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

Django

unread,
Oct 29, 2018, 10:59:51 AM10/29/18
to django-...@googlegroups.com
#29903: Invalid week format in Generic date views WeekArchiveView
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: assigned
Component: Generic views | Version: 2.1
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


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

Django

unread,
Oct 29, 2018, 11:32:20 AM10/29/18
to django-...@googlegroups.com
#29903: Add friendly error message if WeekArchiveView receives an invalid week
format

-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: assigned
Component: Generic views | Version: 2.1
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 Tim Graham):

* stage: Unreviewed => Accepted


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

Django

unread,
Oct 29, 2018, 2:41:01 PM10/29/18
to django-...@googlegroups.com
#29903: Add friendly error message if WeekArchiveView receives an invalid week
format
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: closed

Component: Generic views | Version: 2.1
Severity: Normal | Resolution: fixed
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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"4f8f1b2f245bba83c64b3d5765332bfcb591f1c9" 4f8f1b2f]:
{{{
#!CommitTicketReference repository=""
revision="4f8f1b2f245bba83c64b3d5765332bfcb591f1c9"
Fixed #29903 -- Added error message for invalid WeekArchiveView
week_format.
}}}

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

Reply all
Reply to author
Forward
0 new messages