#328 closed enhancement (fixed)
[patch] Add a archive_week date-based generic view
Reported by: | Dagur Páll Ammendrup | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Core (Other) | Version: | |
Severity: | normal | Keywords: | generic view archive week |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I could really use an archive_week generic view or some way to get a similar effect because archive_day is too little and archive_month is too much.
just throwing it out there.
Attachments (1)
Change History (11)
comment:1 by , 19 years ago
comment:3 by , 19 years ago
archive_week
would be a good addition, but the question is: How do you specify a week in the URL? Do you use the week number, the date of the first day of the week, or what?
comment:4 by , 19 years ago
I took archive_month and created archive_week (see attachment)
This will need testing, but it seems to work.
comment:5 by , 19 years ago
I used the week number and chose monday as the first day of the week. Maybe people should be able to choose.
comment:7 by , 19 years ago
Summary: | archive_week → Add a archive_week date-based generic view |
---|
comment:8 by , 19 years ago
Summary: | Add a archive_week date-based generic view → [patch] Add a archive_week date-based generic view |
---|
comment:9 by , 19 years ago
Can you please rework this to be against magic-removal and re-submit as a patch (see http://www.djangoproject.com/documentation/contributing/#patch-style)?
comment:10 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Well, you could just check out /django/django/views/generic/date_based.py and add an archive_week function analogous to the archive_year and archive_day functions, shouldn't be too hard.