Opened 10 years ago

Closed 7 years ago

#3274 closed enhancement (fixed)

[patch] Provide date_list to template context in archive_month view

Reported by: paolo <paolo@…> Owned by: nobody
Component: Generic views Version: master
Severity: normal Keywords: archive_month date_list
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:

Description

As django.views.generic.date_based.archive_index (and django.views.generic.date_based.archive_year provide) provide a list of datetime.date to template context representing all years (and months) that have objects available according to queryset, it would be coerent that django.views.generic.date_based.archive_month provides a date_list containing datetime.date representing all days that have objects available according to queryset.

Attachments (2)

date_list_for_archive_month.diff (1.8 KB) - added by paolo <paolo@…> 10 years ago.
date_list_for_archive_month
month_archive_date_list.diff (3.2 KB) - added by Sean Brant 7 years ago.

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by paolo <paolo@…>

date_list_for_archive_month

comment:1 Changed 10 years ago by (none)

milestone: Version 1.0

Milestone Version 1.0 deleted

comment:2 Changed 10 years ago by Simon G. <dev@…>

Triage Stage: UnreviewedReady for checkin

comment:3 Changed 9 years ago by Gary Wilson

Needs tests: set
Triage Stage: Ready for checkinAccepted

comment:4 Changed 9 years ago by propanbutan <propanbutan@…>

this works, and has zero potential of breaking anything. in the name of consistency, someone please commit this.

comment:5 in reply to:  4 Changed 7 years ago by Karen Tracey

Replying to propanbutan <propanbutan@gmx.net>:

this works, and has zero potential of breaking anything. in the name of consistency, someone please commit this.

It needs a test. tests/regressiontests/views/tests/generic/date_based.py looks like a likely a good place to add one.

Changed 7 years ago by Sean Brant

comment:6 Changed 7 years ago by Karen Tracey

Resolution: fixed
Status: newclosed

In r12195, forgetting to put the correct incantation in the commit message:

Fixed: 3274: Added date_list context variable to the archive_month generic view, consistent with archive_index and archive_year. Thanks Sean Brant

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