Django

Code

Ticket #328 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

[patch] Add a archive_week date-based generic view

Reported by: Dagur Assigned to: adrian
Milestone: Component: Core framework
Version: Keywords: generic view archive week
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

archive_week.txt (1.5 kB) - added by Dagur on 08/15/05 17:38:36.
My implementation of archive week

Change History

08/15/05 17:03:53 changed by Manuzhai

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.

08/15/05 17:08:22 changed by Dagur

Alright, I'll try and contribute :)

08/15/05 17:09:37 changed by adrian

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?

08/15/05 17:38:36 changed by Dagur

  • attachment archive_week.txt added.

My implementation of archive week

08/15/05 17:40:15 changed by Dagur

I took archive_month and created archive_week (see attachment)

This will need testing, but it seems to work.

08/15/05 17:46:34 changed by Dagur

I used the week number and chose monday as the first day of the week. Maybe people should be able to choose.

08/15/05 17:57:57 changed by Dagur

sorry I meant Sunday (spam spam spam)

09/01/05 18:28:32 changed by adrian

  • summary changed from archive_week to Add a archive_week date-based generic view.

02/27/06 15:46:42 changed by dcf

  • summary changed from Add a archive_week date-based generic view to [patch] Add a archive_week date-based generic view.

02/27/06 17:16:48 changed by jacob

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

04/23/06 19:18:58 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #328 ([patch] Add a archive_week date-based generic view)




Change Properties
Action