Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#1302 closed enhancement (fixed)

[patch] archive_month should provide next_month and previous_month objects

Reported by: James Bennett Owned by: Jacob
Component: Generic views Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The archive_day generic view provides 'next_day' and 'previous_day' date objects, which can be convenient when setting up navigation links in a date-based archive. It'd be even more convenient if the archive_month view provided 'next_month' and 'previous_month' date objects for the same purpose. The only problem I can see with this is that any datetime.date object will, by necessity, include a day component, which could be confusing, but so long as it's clear that these are to be used for their month and year components that shouldn't be a major issue.

Attachments (1)

date_based.diff (967 bytes ) - added by James Bennett 19 years ago.
patch to provide next_month and previous_month in archive_month generic view

Download all attachments as: .zip

Change History (3)

by James Bennett, 19 years ago

Attachment: date_based.diff added

patch to provide next_month and previous_month in archive_month generic view

comment:1 by James Bennett, 19 years ago

Summary: archive_month should provide next_month and previous_month objects[patch] archive_month should provide next_month and previous_month objects

comment:2 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

(In [2323]) Fixed #1302 -- Added next_month and previous_month to template context in archive_month date-based generic view. Thanks, ubernostrum

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