Opened 9 years ago

Closed 9 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: UI/UX:


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@…> 9 years ago.
4619.2.patch (2.7 KB) - added by Collin Grady <cgrady@…> 9 years ago.
woops, forgot docs on the last patch

Download all attachments as: .zip

Change History (5)

comment:1 Changed 9 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design 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.

Changed 9 years ago by Collin Grady <cgrady@…>

Changed 9 years ago by Collin Grady <cgrady@…>

woops, forgot docs on the last patch

comment:2 Changed 9 years ago by Collin Grady <cgrady@…>

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

comment:3 Changed 9 years ago by jacob

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

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