Opened 19 years ago

Closed 18 years ago

Last modified 17 years ago

#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)

archive_week.txt (1.5 KB ) - added by Dagur Páll Ammendrup 19 years ago.
My implementation of archive week

Download all attachments as: .zip

Change History (11)

comment:1 by Manuzhai, 19 years ago

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.

comment:2 by Dagur Páll Ammendrup, 19 years ago

Alright, I'll try and contribute :)

comment:3 by Adrian Holovaty, 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?

by Dagur Páll Ammendrup, 19 years ago

Attachment: archive_week.txt added

My implementation of archive week

comment:4 by Dagur Páll Ammendrup, 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 Dagur Páll Ammendrup, 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:6 by Dagur Páll Ammendrup, 19 years ago

sorry I meant Sunday (spam spam spam)

comment:7 by Adrian Holovaty, 19 years ago

Summary: archive_weekAdd a archive_week date-based generic view

comment:8 by dcf, 18 years ago

Summary: Add a archive_week date-based generic view[patch] Add a archive_week date-based generic view

comment:9 by Jacob, 18 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 Adrian Holovaty, 18 years ago

Resolution: fixed
Status: newclosed

(In [2743]) magic-removal: Fixed #328 -- Added archive_week generic view

Note: See TracTickets for help on using tickets.
Back to Top