Opened 18 years ago

Closed 17 years ago

#4619 closed (wontfix)

Generic Views: Inconsistancy of context variable for date_based views.

Reported by: evan <at> binarymanipulations <dot> com Owned by: nobody
Component: Generic views Version: 0.96
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The context variable that archive_index uses for the list of objects differs from the other date_based generic views, such as archive_month, archive_day, archive_year and object_list. Archive_index uses 'latest' as its context variable while the others archive_month, archive_year et cetera use 'object_list' for their context variables.

It would be much easier if they all had the same context variable so you could use a for loop in a base-template for all of the different generic views.

Attachments (2)

4619.patch (935 bytes ) - added by Collin Grady <cgrady@…> 18 years ago.
4619.2.patch (2.7 KB ) - added by Collin Grady <cgrady@…> 18 years ago.
woops, forgot docs on the last patch

Download all attachments as: .zip

Change History (5)

comment:1 by Chris Beaven, 18 years ago

Triage Stage: UnreviewedDesign decision needed

There's the worry about backwards compatibility. Perhaps archive_index could provide both the old 'latest' context variable and the common 'object_list' variables.

by Collin Grady <cgrady@…>, 18 years ago

Attachment: 4619.patch added

by Collin Grady <cgrady@…>, 18 years ago

Attachment: 4619.2.patch added

woops, forgot docs on the last patch

comment:2 by Collin Grady <cgrady@…>, 18 years ago

Though it is still pre-1.0, so backwards incompatible changes can be made :)

comment:3 by Jacob, 17 years ago

Resolution: wontfix
Status: newclosed

Yes, we're OK with backwards-incompat changes pre-1.0, but there needs to be a good reason for the change. I'd prefer a slight inconsistency to breaking a bunch of people's code.

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