Django

Code

Ticket #3264 (closed: duplicate)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: paolo <paolo@php3.it> Assigned to: adrian
Milestone: Component: Generic views
Version: SVN Keywords: archive_year object_list order ordering
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

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

respect_model_ordering.diff (463 bytes) - added by paolo <paolo@php3.it> on 01/09/07 11:22:53.
respect ordering specified in the model

Change History

01/09/07 11:22:53 changed by paolo <paolo@php3.it>

  • attachment respect_model_ordering.diff added.

respect ordering specified in the model

01/10/07 04:22:19 changed by ramiro <rm0 _at_ gmx.net>

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.

01/13/07 07:29:45 changed by matt.riggott@gmail.com

  • status changed from new to closed.
  • resolution set to duplicate.

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.

01/17/07 16:12:17 changed by

  • milestone deleted.

Milestone Version 1.0 deleted


Add/Change #3264 ([patch] object_list in archive_year view always contains items in ascending order)




Change Properties
Action