Opened 6 years ago
Closed 6 years ago
#29903 closed Cleanup/optimization (fixed)
Add friendly error message if WeekArchiveView receives an invalid week format
Reported by: | Hasan Ramezani | Owned by: | Hasan Ramezani |
---|---|---|---|
Component: | Generic views | Version: | 2.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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.
Change History (4)
comment:1 by , 6 years ago
Owner: | changed from | to
---|
comment:3 by , 6 years ago
Summary: | Invalid week format in Generic date views WeekArchiveView → Add friendly error message if WeekArchiveView receives an invalid week format |
---|---|
Triage Stage: | Unreviewed → Accepted |
Note:
See TracTickets
for help on using tickets.
PR