Opened 17 years ago

Closed 12 years ago

Last modified 12 years ago

#3542 closed New feature (fixed)

Allow month-based date_list on archive_index

Reported by: anonymous Owned by: David Tulig
Component: Generic views Version: dev
Severity: Normal Keywords: date_list month generic view
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

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 (3)

date_list_period.diff (1.8 KB ) - added by David Tulig 16 years ago.
Adds the new parameter and documentation.
t3542-r7354.diff (1.9 KB ) - added by Ramiro Morales 16 years ago.
3542-month-based-archive_index-generic-view-r9973.diff (1.7 KB ) - added by Ramiro Morales 15 years ago.
Updated patch to trunk after the documentation refactoring

Download all attachments as: .zip

Change History (20)

comment:1 by Chris Beaven, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by Jacob, 16 years ago

Triage Stage: Design decision neededAccepted

comment:3 by David Tulig, 16 years ago

Has patch: set
Keywords: sprintdec01 added
Owner: changed from nobody to David Tulig

by David Tulig, 16 years ago

Attachment: date_list_period.diff added

Adds the new parameter and documentation.

comment:4 by Simon G <dev@…>, 16 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Ramiro Morales, 16 years ago

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

by Ramiro Morales, 16 years ago

Attachment: t3542-r7354.diff added

comment:6 by Malcolm Tredinnick, 16 years ago

milestone: post-1.0

comment:7 by (none), 15 years ago

milestone: post-1.0

Milestone post-1.0 deleted

by Ramiro Morales, 15 years ago

Updated patch to trunk after the documentation refactoring

comment:8 by Ramiro Morales, 15 years ago

Keywords: month generic view added; sprintdec01 removed

comment:9 by Malcolm Tredinnick, 14 years ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

Hold on a bit... if I have data from multiple years in my database, isn't this going to collapse *all* the January months into one? That's considered useful?!

The documentation is a little confusing to me. It's correct, but doesn't really tell me *what* a year or month year does. Could we put in a little example of what the output of each might look like so that a user knows why they might want one or the other option?

comment:10 by Russell Keith-Magee, 13 years ago

Also needs to be updated for class-based views.

comment:11 by Łukasz Rekucki, 13 years ago

Severity: Normal
Type: New feature

comment:12 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:13 by Aymeric Augustin, 12 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:14 by Marc Tamlyn <marc.tamlyn@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [8d5c11caad7f87d14b486a46890782fa0b66bb74]:

Fixed #3542 -- Add support for changing granularity on ArchiveView.

Resolving the concept from a very old ticket in a more class-based-view
manner.

comment:15 by Andrew Godwin <andrew@…>, 12 years ago

In [5b09fc8ad2b61331496a7ed2667960ba744c01aa]:

Merge pull request #288 from mjtamlyn/date-list-period

Fixed #3542 -- Add support for changing granularity on ArchiveView.

comment:16 by Aymeric Augustin, 12 years ago

This commit could have used more docs... I'm taking care of them now...

comment:17 by Aymeric Augustin <aymeric.augustin@…>, 12 years ago

In [7207327dd313522954da167f9a41396b97354c78]:

Updated docs for dates generic views.

Fixes #18245. Refs #3542.

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