Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#3264 closed defect (duplicate)

[patch] object_list in archive_year view always contains items in ascending order

Reported by: paolo <paolo@…> Owned by: Adrian Holovaty
Component: Generic views Version: master
Severity: normal Keywords: archive_year object_list order ordering
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


When the keyword make_object_list is True (see #697), object_list contains items in ascending order and 'ordering' option in class Meta has no effect.

Attachments (1)

respect_model_ordering.diff (463 bytes) - added by paolo <paolo@…> 12 years ago.
respect ordering specified in the model

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by paolo <paolo@…>

Attachment: respect_model_ordering.diff added

respect ordering specified in the model

comment:1 Changed 12 years ago by ramiro <rm0 _at_>

See #3134 where another solution is proposed, would you mind writing a small comparison of both patches so the people with SVN commiting powers can review it and decide if/what to implement in trunk?. I don´t dare to mark one of both tickets as duplicate of the other because it will close it in the process.

comment:2 Changed 12 years ago by matt.riggott@…

Resolution: duplicate
Status: newclosed

I'm marking this as a duplicate of #3134, as I think that is the better solution.

To compare the two: this patch changes the archive_year view to use the model's default ordering (thus changing the behaviour of the view); the patch at #3134 offers an optional parameter to specify ordering, defaulting to the current behaviour if left blank. The latter patch also updates the docs.

#3134 is missing unit tests though; unless anyone else provides them first I will add them when I can.

comment:3 Changed 12 years ago by (none)

milestone: Version 1.0

Milestone Version 1.0 deleted

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