Opened 17 years ago

Closed 11 years ago

Last modified 11 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 Changed 17 years ago by Chris Beaven

Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 16 years ago by Jacob

Triage Stage: Design decision neededAccepted

comment:3 Changed 16 years ago by David Tulig

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

Changed 16 years ago by David Tulig

Attachment: date_list_period.diff added

Adds the new parameter and documentation.

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

Triage Stage: AcceptedReady for checkin

comment:5 Changed 16 years ago by Ramiro Morales

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

Changed 16 years ago by Ramiro Morales

Attachment: t3542-r7354.diff added

comment:6 Changed 15 years ago by Malcolm Tredinnick

milestone: post-1.0

comment:7 Changed 15 years ago by (none)

milestone: post-1.0

Milestone post-1.0 deleted

Changed 15 years ago by Ramiro Morales

Updated patch to trunk after the documentation refactoring

comment:8 Changed 15 years ago by Ramiro Morales

Keywords: month generic view added; sprintdec01 removed

comment:9 Changed 13 years ago by Malcolm Tredinnick

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 Changed 13 years ago by Russell Keith-Magee

Also needs to be updated for class-based views.

comment:11 Changed 13 years ago by Łukasz Rekucki

Severity: Normal
Type: New feature

comment:12 Changed 12 years ago by Aymeric Augustin

UI/UX: unset

Change UI/UX from NULL to False.

comment:13 Changed 12 years ago by Aymeric Augustin

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:14 Changed 11 years ago by Marc Tamlyn <marc.tamlyn@…>

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 Changed 11 years ago by Andrew Godwin <andrew@…>

In [5b09fc8ad2b61331496a7ed2667960ba744c01aa]:

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

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

comment:16 Changed 11 years ago by Aymeric Augustin

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

comment:17 Changed 11 years ago by Aymeric Augustin <aymeric.augustin@…>

In [7207327dd313522954da167f9a41396b97354c78]:

Updated docs for dates generic views.

Fixes #18245. Refs #3542.

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