Django

Code

Ticket #3542 (new)

Opened 1 year ago

Last modified 2 months ago

Allow month-based date_list on archive_index

Reported by: anonymous Assigned to: dtulig
Component: Generic views Version: SVN
Keywords: date_list, sprintdec01 Cc:
Triage Stage: Ready for checkin Has patch: 1
Needs documentation: 0 Needs tests: 0
Patch needs improvement: 0

Description

I was trying to create a blog index, similar to the Django weblog, which has a Month and Year archive sidebar.

I figured the correct thing to use was the archive_index generic view, but the date list only gives me years.

I can almost see the reason for this, as archive_index would drill down to archive_year, but it's rare that you would list the years first except for very long-running blogs.

I propose a new argument to archive_index of "date_list_period" which can be 'year' (default) or 'month'.

Attachments

date_list_period.diff (1.8 kB) - added by dtulig on 12/01/07 18:28:16.
Adds the new parameter and documentation.
t3542-r7354.diff (1.9 kB) - added by ramiro on 03/23/08 20:41:19.

Change History

03/12/07 20:02:06 changed by SmileyChris

  • needs_better_patch changed.
  • stage changed from Unreviewed to Design decision needed.
  • needs_tests changed.
  • needs_docs changed.

12/01/07 13:12:41 changed by jacob

  • stage changed from Design decision needed to Accepted.

12/01/07 18:19:23 changed by dtulig

  • keywords changed from date_list to date_list, sprintdec01.
  • owner changed from nobody to dtulig.
  • has_patch set to 1.

12/01/07 18:28:16 changed by dtulig

  • attachment date_list_period.diff added.

Adds the new parameter and documentation.

12/01/07 22:08:20 changed by Simon G <dev@simon.net.nz>

  • stage changed from Accepted to Ready for checkin.

03/23/08 20:34:51 changed by ramiro

Attaching an updated revision of the patch that appplies to trunk as of r7354.

03/23/08 20:41:19 changed by ramiro

  • attachment t3542-r7354.diff added.

Add/Change #3542 (Allow month-based date_list on archive_index)




Change Properties
Action