Code

Opened 7 years ago

Closed 4 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@…> 7 years ago.
date_list_for_archive_month
month_archive_date_list.diff (3.2 KB) - added by seanbrant 4 years ago.

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by paolo <paolo@…>

date_list_for_archive_month

comment:1 Changed 7 years ago by anonymous

  • milestone Version 1.0 deleted

Milestone Version 1.0 deleted

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

  • Triage Stage changed from Unreviewed to Ready for checkin

comment:3 Changed 7 years ago by gwilson

  • Needs tests set
  • Triage Stage changed from Ready for checkin to Accepted

comment:4 follow-up: Changed 6 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 5 years ago by kmtracey

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 4 years ago by seanbrant

comment:6 Changed 4 years ago by kmtracey

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.